結果
問題 |
No.32 貯金箱の憂鬱
|
ユーザー |
|
提出日時 | 2018-10-02 23:40:10 |
言語 | JavaScript (node v23.5.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 423 bytes |
コンパイル時間 | 93 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 41,324 KB |
最終ジャッジ日時 | 2024-10-13 00:42:58 |
合計ジャッジ時間 | 1,505 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 8 |
ソースコード
function Main(input) { input = input.split('\n'); let K = 0; let L = parseInt(input[0]); let M = parseInt(input[1]); let N = parseInt(input[2]); if (N >= 25) { M += Math.ceil(N / 25); N %= 25; } if (M >= 4) { L += Math.ceil(M / 4); M %= 4; } if (L >= 10) { K += Math.ceil(L / 10); L %= 10; } console.log(L + M + N); } Main(require('fs').readFileSync('/dev/stdin', 'utf8'));