結果

問題 No.32 貯金箱の憂鬱
ユーザー marumaru
提出日時 2016-03-22 17:03:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 493 bytes
コンパイル時間 3,219 ms
コンパイル使用メモリ 71,504 KB
実行使用メモリ 56,236 KB
最終ジャッジ日時 2023-09-30 08:04:29
合計ジャッジ時間 5,580 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,760 KB
testcase_01 AC 125 ms
55,764 KB
testcase_02 AC 124 ms
55,900 KB
testcase_03 AC 125 ms
55,924 KB
testcase_04 AC 123 ms
55,892 KB
testcase_05 AC 125 ms
55,504 KB
testcase_06 AC 124 ms
56,236 KB
testcase_07 AC 124 ms
55,976 KB
testcase_08 AC 123 ms
55,600 KB
testcase_09 AC 125 ms
55,872 KB
testcase_10 AC 127 ms
56,028 KB
testcase_11 AC 126 ms
56,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class yukicoder_32 {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int l = stdIn.nextInt();
		int m = stdIn.nextInt();
		int n = stdIn.nextInt();
		
		int sum = (l * 100) + (m * 25) + (n * 1);
		
		int yen1000 = sum / 1000;
		int yen100 = (sum % 1000) / 100;
		int yen25 = ((sum % 1000) % 100) / 25;
		int yen1 = (((sum % 1000) % 100) % 25);
		
		int coin = yen100 + yen25 + yen1;
		
		System.out.println(coin);
	}
}
0