| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
直接水过了!!! 没有贪心!
#include <stdio.h>
int main()
{int a,b,c,d,e,x,n;
scanf("%d",&n);
while(n--)
{scanf("%d",&a);
x=a;
b=x/25;x%=25;
c=x/10;x%=10;
d=x/5; x%=5;
e=x/1;
printf("%d %d QUARTER(S), %d DIME(S), %d NICKEL(S), %d PENNY(S)\n",a,b,c,d,e);
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator