結果

問題 No.32 貯金箱の憂鬱
ユーザー jp_ste
提出日時 2016-03-02 19:41:19
言語 Java
(openjdk 23)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 538 bytes
コンパイル時間 2,360 ms
コンパイル使用メモリ 74,700 KB
実行使用メモリ 54,340 KB
最終ジャッジ日時 2024-07-23 02:16:34
合計ジャッジ時間 4,484 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner scan = new Scanner(System.in)) {
            int L = scan.nextInt();
            int M = scan.nextInt();
            int N = scan.nextInt();

            int divN = N / 25;
            int remN = N % 25;
            int divM = (M+divN) / 4;
            int remM = (M+divN) % 4;
            int remL = (L+divM) % 10;
            
            int ans = remN + remM + remL;
            System.out.println(ans);
        }
    }
}
0