結果

問題 No.32 貯金箱の憂鬱
ユーザー kaoetayakaoetaya
提出日時 2016-11-08 11:23:53
言語 Java19
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 477 bytes
コンパイル時間 3,256 ms
コンパイル使用メモリ 72,184 KB
実行使用メモリ 55,904 KB
最終ジャッジ日時 2023-09-30 08:17:18
合計ジャッジ時間 5,747 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,272 KB
testcase_01 AC 131 ms
55,644 KB
testcase_02 AC 127 ms
53,656 KB
testcase_03 AC 128 ms
55,744 KB
testcase_04 AC 131 ms
55,872 KB
testcase_05 AC 130 ms
55,904 KB
testcase_06 AC 130 ms
55,608 KB
testcase_07 AC 129 ms
55,652 KB
testcase_08 AC 128 ms
55,596 KB
testcase_09 AC 127 ms
55,548 KB
testcase_10 AC 126 ms
55,644 KB
testcase_11 AC 127 ms
55,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.Arrays;

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

        Scanner sc = new Scanner(System.in);

		int l = sc.nextInt();
        int n = sc.nextInt();
        int m = sc.nextInt();
		
		if(m/25 > 0){
			n += m/25;
			m %= 25;
		}
		
		if((25*n)/100 > 0){
			l += (25*n)/100;
			n = ((25*n)%100)/25;
		}
		
		if(100*l > 1000)
			l = ((100*l)%1000)/100;
		
		int sum = l+n+m;
		
		System.out.println(sum);
    }
}
0