結果

問題 No.32 貯金箱の憂鬱
ユーザー gomagoma
提出日時 2017-09-19 19:51:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 332 bytes
コンパイル時間 1,940 ms
コンパイル使用メモリ 71,752 KB
実行使用メモリ 57,788 KB
最終ジャッジ日時 2023-09-30 12:41:38
合計ジャッジ時間 4,196 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
54,756 KB
testcase_01 AC 121 ms
57,788 KB
testcase_02 AC 121 ms
55,716 KB
testcase_03 AC 119 ms
55,720 KB
testcase_04 AC 120 ms
55,804 KB
testcase_05 AC 119 ms
55,556 KB
testcase_06 AC 120 ms
55,872 KB
testcase_07 AC 121 ms
55,752 KB
testcase_08 AC 121 ms
56,220 KB
testcase_09 AC 122 ms
55,948 KB
testcase_10 AC 122 ms
55,504 KB
testcase_11 AC 124 ms
56,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();// 100
		int b = sc.nextInt();// 25
		int c = sc.nextInt();// 1

		int ans = (100 * a + 25 * b + c) % 1000;
		System.out.println(ans / 100 + ans % 100 / 25 + ans % 100 % 25);

	}
}
0