結果

問題 No.32 貯金箱の憂鬱
ユーザー takutakutakutaku
提出日時 2020-09-16 17:05:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 569 bytes
コンパイル時間 1,971 ms
コンパイル使用メモリ 71,332 KB
実行使用メモリ 57,888 KB
最終ジャッジ日時 2023-09-30 14:00:58
合計ジャッジ時間 4,232 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
56,264 KB
testcase_01 AC 123 ms
57,888 KB
testcase_02 AC 123 ms
55,820 KB
testcase_03 AC 121 ms
56,292 KB
testcase_04 AC 123 ms
56,088 KB
testcase_05 AC 121 ms
56,324 KB
testcase_06 AC 123 ms
55,932 KB
testcase_07 AC 125 ms
55,824 KB
testcase_08 AC 122 ms
55,596 KB
testcase_09 AC 123 ms
55,804 KB
testcase_10 AC 121 ms
56,100 KB
testcase_11 AC 121 ms
56,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main(String[] args) {
	    
	    // 入力情報を受け取る
	    Scanner sc = new Scanner(System.in);
	    int l = sc.nextInt();
	    int m = sc.nextInt();
	    int n = sc.nextInt();
	    
	    int sum = 100 * l + 25 * m + n;
	    
	    int result1 = sum / 1000;
	    int after1 = sum % 1000;
	    
	    int result2 = after1 / 100;
	    int after2 = after1 % 100;
	    
	    int result3 = after2 / 25;
	    int after3 = after2 % 25;
	    
	    System.out.println(result2 + result3 + after3);
	    
	}
}

0