結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,712 KB
testcase_01 AC 128 ms
55,764 KB
testcase_02 AC 126 ms
55,788 KB
testcase_03 AC 124 ms
55,780 KB
testcase_04 AC 125 ms
55,688 KB
testcase_05 AC 126 ms
55,428 KB
testcase_06 AC 127 ms
55,712 KB
testcase_07 AC 126 ms
55,796 KB
testcase_08 AC 125 ms
55,712 KB
testcase_09 AC 125 ms
55,480 KB
testcase_10 AC 123 ms
55,880 KB
testcase_11 AC 128 ms
55,772 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