13: Payment in RMB and payment in RMB 13
13: RMB Payment
- View
- Submit
- Statistics
- Question
-
Total time limit:
-
1000 ms
-
Memory limit:
-
65536kB
-
Description
-
Input a specified amount (in Yuan, for example, 345) from the keyboard, and then output the number of different denominations that pay the amount in RMB, showing 100 yuan, 50 yuan, 20 yuan, 10 yuan, 5 yuan, 1 yuan each how many, need to use a large denomination of banknotes.
-
Input
-
A positive integer smaller than 1000.
-
Output
-
Output branch. Each line shows an integer, indicating the numbers of 100 yuan, 50 yuan, 20 yuan, 10 yuan, 5 yuan, and 1 yuan respectively.
-
Sample Input
-
735
-
Sample output
-
701110
1 #include<iostream> 2 #include<cstdio> 3 #include<queue> 4 #include<cmath> 5 using namespace std; 6 int main() 7 { 8 int n; 9 cin>>n;10 cout<<n/100<<endl;//10011 n=n%100;12 cout<<n/50<<endl;//10013 n=n%50;14 cout<<n/20<<endl;//10015 n=n%20;16 cout<<n/10<<endl;//10017 n=n%10;18 cout<<n/5<<endl;//10019 n=n%5;20 cout<<n/1<<endl;//10021 n=n%1;22 return 0;23 }