結果

問題 No.32 貯金箱の憂鬱
ユーザー ryosuke0825ryosuke0825
提出日時 2018-04-07 21:16:52
言語 Java
(openjdk 23)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 421 bytes
コンパイル時間 3,737 ms
コンパイル使用メモリ 74,092 KB
実行使用メモリ 54,372 KB
最終ジャッジ日時 2024-07-23 07:08:57
合計ジャッジ時間 5,650 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No32 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int L = sc.nextInt();
		int M = sc.nextInt();
		int N = sc.nextInt();
		int sum = L * 100 + M * 25 + N;

		sum = sum % 1000;

		int coinCount = sum / 100;
		sum = sum % 100;

		coinCount = coinCount + sum / 25;
		sum = sum % 25;

		coinCount += sum;

		System.out.println(coinCount);
	}

}
0