結果
問題 |
No.32 貯金箱の憂鬱
|
ユーザー |
|
提出日時 | 2022-07-15 16:54:54 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 750 bytes |
コンパイル時間 | 4,118 ms |
コンパイル使用メモリ | 74,348 KB |
実行使用メモリ | 54,372 KB |
最終ジャッジ日時 | 2024-06-27 11:45:56 |
合計ジャッジ時間 | 6,024 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 11 |
ソースコード
import java.util.*; public class no32 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int hundred = sc.nextInt(); int tw5 = sc.nextInt(); int one = sc.nextInt(); int cnt = 0; int keep = 0; int sum = 0; if (one != 0) { cnt = one / 25; one = one % 25; } tw5 += cnt; cnt = 0; if(tw5 != 0){ cnt = tw5 / 25; tw5 = tw5 % 25; } hundred += cnt; if(hundred != 0){ cnt = hundred / 10; hundred = hundred % 100; } sum = hundred + tw5 + one; System.out.println(sum); } }