結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー | matsuyoshi30 |
提出日時 | 2016-01-01 13:17:29 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 125 ms / 5,000 ms |
コード長 | 715 bytes |
コンパイル時間 | 1,989 ms |
コンパイル使用メモリ | 70,764 KB |
実行使用メモリ | 57,880 KB |
最終ジャッジ日時 | 2023-09-30 08:00:55 |
合計ジャッジ時間 | 4,220 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 123 ms
55,772 KB |
testcase_01 | AC | 125 ms
55,844 KB |
testcase_02 | AC | 122 ms
55,512 KB |
testcase_03 | AC | 123 ms
57,880 KB |
testcase_04 | AC | 121 ms
55,848 KB |
testcase_05 | AC | 122 ms
55,948 KB |
testcase_06 | AC | 121 ms
55,960 KB |
testcase_07 | AC | 121 ms
55,704 KB |
testcase_08 | AC | 120 ms
56,248 KB |
testcase_09 | AC | 120 ms
55,568 KB |
testcase_10 | AC | 121 ms
55,960 KB |
testcase_11 | AC | 120 ms
56,028 KB |
ソースコード
import java.util.Scanner; class Test { public static void main(String[] args) { Scanner in = new Scanner(System.in); String str1, str2, str3; str1 = in.nextLine(); str2 = in.nextLine(); str3 = in.nextLine(); int L, M, N, n; L = Integer.parseInt(str1); M = Integer.parseInt(str2); N = Integer.parseInt(str3); //N * 25 -> M, M * 4 -> L, L * 10 -> n //WANT : _L + _M + _N int p1 = N / 25; int _N = N % 25; int p2 = p1 + M; int p3 = p2 / 4; int _M = p2 % 4; int p4 = p3 + L; int p5 = p4 / 10; int _L = p4 % 10; System.out.println(_L + _M + _N); } }