結果

問題 No.32 貯金箱の憂鬱
ユーザー Amanita2016Amanita2016
提出日時 2017-06-27 23:38:05
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 739 bytes
コンパイル時間 1,887 ms
コンパイル使用メモリ 74,308 KB
実行使用メモリ 54,352 KB
最終ジャッジ日時 2024-04-15 03:36:49
合計ジャッジ時間 3,876 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
54,352 KB
testcase_01 AC 118 ms
53,992 KB
testcase_02 AC 108 ms
52,768 KB
testcase_03 AC 108 ms
53,036 KB
testcase_04 AC 113 ms
53,476 KB
testcase_05 AC 110 ms
53,276 KB
testcase_06 WA -
testcase_07 AC 108 ms
54,224 KB
testcase_08 AC 105 ms
53,000 KB
testcase_09 AC 105 ms
52,896 KB
testcase_10 AC 117 ms
53,888 KB
testcase_11 AC 124 ms
54,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {	
		Scanner sc = new Scanner(System.in);
		int total = 0;
	    int l = sc.nextInt();
	    int m = sc.nextInt();
	    int n = sc.nextInt();
	    int subTotal1=0;
	    int subTotal25=0;
	    int subTotal100=0;
	    int mod;
	    mod = n % 1000;
	    subTotal100 += mod / 100;
	    mod %= 100;
	    subTotal25 += mod / 25;
	    mod %= 25;
	    subTotal1 += mod;
	    mod = m % 40;
	    subTotal100 += mod / 4;
	    mod = m % 4;
	    subTotal25 += mod;
	    subTotal100 += l % 10;
	    total += subTotal1;
	    total += subTotal25;
	    total += subTotal100%10;
	    System.out.println(total);
	}

}
0