結果

問題 No.32 貯金箱の憂鬱
ユーザー めうめう🎒めうめう🎒
提出日時 2016-05-09 23:55:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 676 bytes
コンパイル時間 2,043 ms
コンパイル使用メモリ 71,716 KB
実行使用メモリ 56,248 KB
最終ジャッジ日時 2023-09-30 08:08:26
合計ジャッジ時間 4,445 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
53,880 KB
testcase_01 AC 125 ms
55,928 KB
testcase_02 AC 124 ms
56,032 KB
testcase_03 AC 125 ms
55,744 KB
testcase_04 AC 121 ms
55,800 KB
testcase_05 AC 125 ms
55,448 KB
testcase_06 AC 126 ms
56,124 KB
testcase_07 AC 128 ms
55,804 KB
testcase_08 AC 126 ms
55,872 KB
testcase_09 AC 126 ms
56,248 KB
testcase_10 AC 126 ms
56,208 KB
testcase_11 AC 126 ms
55,640 KB
権限があれば一括ダウンロードができます

ソースコード

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 c = sc.nextInt();
		int b = sc.nextInt();
		int a = sc.nextInt();
		m.setA(a);
		m.setB(b);
		m.setC(c);
		System.out.println(m.ans());
	}
}
0