結果

問題 No.32 貯金箱の憂鬱
ユーザー reo3313reo3313
提出日時 2015-09-24 17:19:49
言語 Java
(openjdk 23)
結果
AC  
実行時間 150 ms / 5,000 ms
コード長 659 bytes
コンパイル時間 3,521 ms
コンパイル使用メモリ 76,288 KB
実行使用メモリ 54,536 KB
最終ジャッジ日時 2024-07-23 02:10:03
合計ジャッジ時間 6,215 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

package test1;
import java.util.Scanner;
import java.util.regex.Pattern;
import java.util.regex.Matcher;

public class test1_class {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);

        int c1000 = 0;
        int c100 = sc.nextInt();
        int c25 = sc.nextInt();
        int c1 = sc.nextInt();
        
       	c25 = c25 + c1/25;
       	c1 = c1%25;
        	
       	c100 = c100 + c25/4;
       	c25 = c25%4;

       	c1000 = c1000 + c100/10;
       	c100 = c100%10;

       	System.out.print(c1+c25+c100 + "\n");
    }
}
0