結果
問題 |
No.32 貯金箱の憂鬱
|
ユーザー |
![]() |
提出日時 | 2016-08-05 01:17:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 504 bytes |
コンパイル時間 | 1,545 ms |
コンパイル使用メモリ | 166,796 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-23 02:22:22 |
合計ジャッジ時間 | 2,121 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
#include <bits/stdc++.h> using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; int main() { int L, M, N; cin >> L >> M >> N; int total = ( L*100 + M*25 + N ) % 1000, count{}; while( total != 0 ) { if( total >= 1000 ) { total -= 1000; } else if( total >= 100 ) { count++; total -= 100; } else if( total >= 25 ) { count++; total -= 25; } else if( total >= 1 ) { count++; total -= 1; } } cout << count << endl; return 0; }