結果

問題 No.32 貯金箱の憂鬱
ユーザー Koketti1
提出日時 2017-02-05 17:04:43
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 438 bytes
コンパイル時間 2,553 ms
コンパイル使用メモリ 74,308 KB
実行使用メモリ 54,300 KB
最終ジャッジ日時 2024-07-23 02:28:55
合計ジャッジ時間 4,334 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		int L = scanner.nextInt();
		int M = scanner.nextInt();
		int N = scanner.nextInt();
		int sum = 0;
		int ans = 0;
		
		sum = 100 * L + 25 * M + N;
		sum = sum % 1000;
		ans += sum / 100;
		sum %= 100;
		ans += sum / 25;
		sum %= 25;
		ans += sum;
		
		System.out.println(ans);
		
		scanner.close();
	}
}
0