結果
問題 |
No.32 貯金箱の憂鬱
|
ユーザー |
![]() |
提出日時 | 2018-12-31 19:11:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 467 ms |
コンパイル使用メモリ | 58,840 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-23 07:23:51 |
合計ジャッジ時間 | 1,041 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int l,m,n,msum=0;cin>>l>>m>>n; //1円玉が25枚以上あったら25円玉に両替。mにプラス。 m+=n/25; msum+=n%25; //25円玉が4枚以上あったら100円玉に両替。lにプラス。 l+=m/4; msum+=m%4; //100円玉が10枚以上あったら1000円札に両替。 msum+=l%10; cout<<msum<<endl; }