結果

問題 No.32 貯金箱の憂鬱
ユーザー kazapyon27kazapyon27
提出日時 2017-05-05 01:28:34
言語 Java19
(openjdk 21)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 676 bytes
コンパイル時間 3,035 ms
コンパイル使用メモリ 71,756 KB
実行使用メモリ 49,892 KB
最終ジャッジ日時 2023-09-30 10:28:40
合計ジャッジ時間 4,232 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,512 KB
testcase_01 AC 43 ms
49,264 KB
testcase_02 AC 43 ms
49,448 KB
testcase_03 AC 42 ms
49,172 KB
testcase_04 AC 43 ms
49,292 KB
testcase_05 AC 43 ms
49,440 KB
testcase_06 AC 43 ms
49,520 KB
testcase_07 AC 43 ms
49,428 KB
testcase_08 AC 43 ms
49,848 KB
testcase_09 AC 43 ms
49,320 KB
testcase_10 AC 43 ms
49,164 KB
testcase_11 AC 44 ms
49,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*No.32 貯金箱の憂鬱*/
import java.io.*;
public class No32 {
	public static void main(String[] args) {
		String h_maisuu[]=new String[3];
		int mai_1,mai_25,mai_100,mai_1000=0;
		try(BufferedReader input =new BufferedReader(new InputStreamReader(System.in))){
			mai_100=Integer.parseInt(input.readLine());
			mai_25=Integer.parseInt(input.readLine());
			mai_1=Integer.parseInt(input.readLine());
			mai_25+=mai_1/25;
			mai_1%=25;			
			mai_100+=25*mai_25/100;
			mai_25-=100/25*(25*mai_25/100);
			mai_1000+=100*mai_100/1000;
			mai_100-=1000/100*(100*mai_100/1000);
			System.out.println(mai_1+mai_25+mai_100);
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
0