1 solutions
-
0
#include<iostream> #include<iomanip> using namespace std; int main(){ int a, b; cin>>a; int n_100, n_50, n_20, n_10, n_5, n_1; n_100 = a/100; b = a%100; n_50 = b/50; b = b%50; n_20 = b/20; b = b%20; n_10 = b/10; b = b%10; n_5 = b/5; b = b%5; n_1 = a%100%50%20%10%5; cout<<n_100<<endl<<n_50<<endl<<n_20<<endl<<n_10<<endl<<n_5<<endl<<n_1<<endl; return 0; }
- 1
Information
- ID
- 371
- Time
- 60ms
- Memory
- 10MiB
- Difficulty
- 3
- Tags
- # Submissions
- 132
- Accepted
- 68
- Uploaded By