mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 03:31:59 +00:00
653. 钞票
https://www.acwing.com/problem/content/submission/code_detail/8063675/
This commit is contained in:
parent
bf69b6fcb3
commit
c02434fa38
18
AcWing/653/653.cpp
Normal file
18
AcWing/653/653.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int n;
|
||||
|
||||
int main() {
|
||||
cin >> n;
|
||||
cout << n << endl
|
||||
<< n / 100 << " nota(s) de R$ 100,00" << endl
|
||||
<< (n %= 100) / 50 << " nota(s) de R$ 50,00" << endl
|
||||
<< (n %= 50) / 20 << " nota(s) de R$ 20,00" << endl
|
||||
<< (n %= 20) / 10 << " nota(s) de R$ 10,00" << endl
|
||||
<< (n %= 10) / 5 << " nota(s) de R$ 5,00" << endl
|
||||
<< (n %= 5) / 2 << " nota(s) de R$ 2,00" << endl
|
||||
<< n % 2 << " nota(s) de R$ 1,00" << endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user