結果

問題 No.32 貯金箱の憂鬱
ユーザー CroweaCrowea
提出日時 2019-02-04 12:51:05
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 520 bytes
コンパイル時間 2,475 ms
コンパイル使用メモリ 97,760 KB
実行使用メモリ 22,872 KB
最終ジャッジ日時 2023-08-26 04:13:46
合計ジャッジ時間 4,003 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
22,640 KB
testcase_01 AC 54 ms
22,760 KB
testcase_02 AC 53 ms
20,764 KB
testcase_03 AC 53 ms
18,712 KB
testcase_04 WA -
testcase_05 AC 54 ms
22,800 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 54 ms
20,800 KB
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Program
{
    public static void Main(string[] args)
    {
        int L = 0, M = 0, N = 0;
        L = int.Parse(Console.ReadLine());
        M = int.Parse(Console.ReadLine());
        N = int.Parse(Console.ReadLine());

        if (L == 0 && M == 0 && N == 0) { Console.WriteLine(0); return; }
                
        while (N >= 25 )  { N -= 25; M += 25; }
        while (M >=  4)     { M -= 4; L += 1; }
        while (L >= 10) { L -= 10; }

        Console.WriteLine(N + M + L);
    }
}
0