結果

問題 No.32 貯金箱の憂鬱
ユーザー めうめう🎒めうめう🎒
提出日時 2016-05-09 23:54:26
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 675 bytes
コンパイル時間 2,249 ms
コンパイル使用メモリ 75,148 KB
実行使用メモリ 41,688 KB
最終ジャッジ日時 2024-04-15 15:01:16
合計ジャッジ時間 4,512 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
41,228 KB
testcase_01 AC 132 ms
41,340 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 120 ms
40,344 KB
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Queue;
import java.util.Scanner;


public class Main {
	private int a;
	private int b;
	private int c;
	
	public void setA(int a){
		this.a = a;
	}
	
	public void setB(int b){
		this.b = b;
	}
	
	public void setC(int c){
		this.c = c;
	}
	
	public int ans(){
		b += a / 25;
		a = a % 25;
		c += b / 4;
		b = b % 4;
		c = c % 10;
		return a + b + c;
	}
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Main m = new Main();
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		m.setA(a);
		m.setB(b);
		m.setC(c);
		System.out.println(m.ans());
	}
}
0