結果

問題 No.32 貯金箱の憂鬱
ユーザー reo3313reo3313
提出日時 2015-09-24 17:19:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 147 ms / 5,000 ms
コード長 659 bytes
コンパイル時間 4,313 ms
コンパイル使用メモリ 73,872 KB
実行使用メモリ 56,060 KB
最終ジャッジ日時 2023-09-30 07:56:39
合計ジャッジ時間 6,331 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
55,484 KB
testcase_01 AC 141 ms
55,760 KB
testcase_02 AC 143 ms
55,624 KB
testcase_03 AC 142 ms
55,944 KB
testcase_04 AC 141 ms
55,760 KB
testcase_05 AC 142 ms
55,688 KB
testcase_06 AC 142 ms
55,524 KB
testcase_07 AC 143 ms
55,568 KB
testcase_08 AC 143 ms
56,028 KB
testcase_09 AC 142 ms
56,060 KB
testcase_10 AC 147 ms
55,784 KB
testcase_11 AC 143 ms
54,004 KB
権限があれば一括ダウンロードができます

ソースコード

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