結果

問題 No.32 貯金箱の憂鬱
ユーザー howakurohowakuro
提出日時 2015-09-25 00:50:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 495 bytes
コンパイル時間 3,178 ms
コンパイル使用メモリ 72,424 KB
実行使用メモリ 56,096 KB
最終ジャッジ日時 2023-09-30 07:56:55
合計ジャッジ時間 5,472 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,768 KB
testcase_01 AC 124 ms
55,504 KB
testcase_02 AC 125 ms
55,752 KB
testcase_03 AC 126 ms
55,880 KB
testcase_04 AC 127 ms
56,064 KB
testcase_05 AC 124 ms
53,784 KB
testcase_06 AC 127 ms
55,808 KB
testcase_07 AC 127 ms
55,768 KB
testcase_08 AC 126 ms
55,680 KB
testcase_09 AC 125 ms
56,096 KB
testcase_10 AC 123 ms
55,504 KB
testcase_11 AC 126 ms
55,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Gomokunarabe {
	static Scanner scan = new Scanner(System.in);
	public static void main(String[] args) {
		int L =scan.nextInt()*100;
		int M =scan.nextInt()*25;
		int N =scan.nextInt();
		
		int Total = L+M+N;
		
		int Thousand = Total/1000;
		Total -= Thousand*1000;
		
		int Handred = Total/100;
		Total -=Handred*100;
		
		int TowentyFive = Total/25;
		Total -= TowentyFive*25;
		
		int one = Total;
		System.out.println(Handred+TowentyFive+one);
	}
}
0