結果

問題 No.32 貯金箱の憂鬱
ユーザー mits58mits58
提出日時 2016-05-05 14:04:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 425 bytes
コンパイル時間 2,407 ms
コンパイル使用メモリ 72,192 KB
実行使用メモリ 56,180 KB
最終ジャッジ日時 2023-09-30 08:06:19
合計ジャッジ時間 5,011 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
53,972 KB
testcase_01 AC 127 ms
56,044 KB
testcase_02 AC 127 ms
55,948 KB
testcase_03 AC 127 ms
55,860 KB
testcase_04 AC 126 ms
55,644 KB
testcase_05 AC 124 ms
55,780 KB
testcase_06 AC 123 ms
56,180 KB
testcase_07 AC 124 ms
55,584 KB
testcase_08 AC 125 ms
55,896 KB
testcase_09 AC 125 ms
55,860 KB
testcase_10 AC 125 ms
55,716 KB
testcase_11 AC 128 ms
55,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
        	int l=sc.nextInt();
        	int m=sc.nextInt();
        	int n=sc.nextInt();
        	int sum=l*100+m*25+n;
        	sum%=1000;
        	l=sum/100;
        	m=(sum%100)/25;
        	n=sum-l*100-m*25;
        	System.out.println(l+m+n);
        }
    }
}
0