結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー | eagle |
提出日時 | 2022-05-26 14:43:02 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 132 ms / 5,000 ms |
コード長 | 570 bytes |
コンパイル時間 | 2,372 ms |
コンパイル使用メモリ | 73,860 KB |
実行使用メモリ | 57,576 KB |
最終ジャッジ日時 | 2023-10-20 19:27:02 |
合計ジャッジ時間 | 3,999 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 118 ms
57,576 KB |
testcase_01 | AC | 120 ms
57,500 KB |
testcase_02 | AC | 119 ms
57,456 KB |
testcase_03 | AC | 118 ms
57,436 KB |
testcase_04 | AC | 121 ms
57,420 KB |
testcase_05 | AC | 121 ms
57,268 KB |
testcase_06 | AC | 132 ms
57,432 KB |
testcase_07 | AC | 127 ms
57,452 KB |
testcase_08 | AC | 126 ms
57,456 KB |
testcase_09 | AC | 114 ms
57,168 KB |
testcase_10 | AC | 113 ms
57,440 KB |
testcase_11 | AC | 118 ms
57,312 KB |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); //100円硬貨の枚数 int L = sc.nextInt(); //25円硬貨の枚数 int M = sc.nextInt(); //1円硬貨の枚数 int N = sc.nextInt(); //1円硬貨を両替 M += N / 25; N = N % 25; //25円硬貨を両替 L += M / 4; M = M % 4; //100円硬貨を両替 L = L % 10; //硬貨の合計枚数を求める int sum = N + M + L; System.out.println(sum); } }