結果
問題 |
No.32 貯金箱の憂鬱
|
ユーザー |
![]() |
提出日時 | 2024-09-28 18:36:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 403 bytes |
コンパイル時間 | 1,682 ms |
コンパイル使用メモリ | 167,328 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-09-28 18:36:28 |
合計ジャッジ時間 | 2,411 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int l,m,n; cin >> l >> m >> n; int sum = l*100+m*25+n; sum %= 1000; int cnt = 0; if(sum >= 100) { cnt += sum/100; sum %= 100; } if(sum >= 25){ cnt += sum/25; sum %= 25; } cnt += sum; cout << cnt << endl; return 0; }