From c02434fa381b4bc698d7357d255548e8e998aa53 Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Tue, 5 Oct 2021 17:26:49 +0800 Subject: [PATCH] =?UTF-8?q?653.=20=E9=92=9E=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.acwing.com/problem/content/submission/code_detail/8063675/ --- AcWing/653/653.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 AcWing/653/653.cpp diff --git a/AcWing/653/653.cpp b/AcWing/653/653.cpp new file mode 100644 index 00000000..262dc4d3 --- /dev/null +++ b/AcWing/653/653.cpp @@ -0,0 +1,18 @@ +#include + +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; +}