結果

問題 No.32 貯金箱の憂鬱
ユーザー Koketti1Koketti1
提出日時 2017-02-05 17:04:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 438 bytes
コンパイル時間 2,489 ms
コンパイル使用メモリ 71,132 KB
実行使用メモリ 56,356 KB
最終ジャッジ日時 2023-09-30 08:22:13
合計ジャッジ時間 4,985 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,296 KB
testcase_01 AC 127 ms
55,784 KB
testcase_02 AC 130 ms
55,632 KB
testcase_03 AC 130 ms
55,588 KB
testcase_04 AC 131 ms
55,584 KB
testcase_05 AC 128 ms
55,308 KB
testcase_06 AC 133 ms
55,484 KB
testcase_07 AC 132 ms
55,600 KB
testcase_08 AC 130 ms
56,356 KB
testcase_09 AC 133 ms
55,932 KB
testcase_10 AC 132 ms
55,536 KB
testcase_11 AC 134 ms
55,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		int L = scanner.nextInt();
		int M = scanner.nextInt();
		int N = scanner.nextInt();
		int sum = 0;
		int ans = 0;
		
		sum = 100 * L + 25 * M + N;
		sum = sum % 1000;
		ans += sum / 100;
		sum %= 100;
		ans += sum / 25;
		sum %= 25;
		ans += sum;
		
		System.out.println(ans);
		
		scanner.close();
	}
}
0