結果
問題 |
No.32 貯金箱の憂鬱
|
ユーザー |
|
提出日時 | 2022-07-15 16:49:01 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 770 bytes |
コンパイル時間 | 3,219 ms |
コンパイル使用メモリ | 74,496 KB |
実行使用メモリ | 56,044 KB |
最終ジャッジ日時 | 2024-06-27 11:37:46 |
合計ジャッジ時間 | 5,536 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 + tw5; cnt = 0; if(tw5 != 0){ cnt = tw5 / 25; tw5 = tw5 % 25; } hundred = hundred + cnt; if(hundred != 0){ cnt = hundred / 10; hundred = hundred % 100; } sum = cnt + hundred + tw5 + one; System.out.println(sum); } }