結果

問題 No.32 貯金箱の憂鬱
ユーザー kaoetaya
提出日時 2016-11-08 11:23:53
言語 Java
(openjdk 23)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 477 bytes
コンパイル時間 3,243 ms
コンパイル使用メモリ 74,340 KB
実行使用メモリ 54,276 KB
最終ジャッジ日時 2024-07-23 02:26:40
合計ジャッジ時間 5,493 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

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