13: Payment in RMB and payment in RMB 13

Source: Internet
Author: User

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 }

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.