結果

問題 No.32 貯金箱の憂鬱
ユーザー 明智重蔵明智重蔵
提出日時 2015-08-02 19:25:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 56 ms / 5,000 ms
コード長 1,204 bytes
コンパイル時間 3,937 ms
コンパイル使用メモリ 103,012 KB
実行使用メモリ 22,744 KB
最終ジャッジ日時 2023-09-30 07:53:25
合計ジャッジ時間 5,180 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

using System;
using System.Collections.Generic;

class Program
{
    static string InputPattern = "Input3";

    static List<string> GetInputList()
    {
        var WillReturn = new List<string>();

        if (InputPattern == "Input1") {
            WillReturn.Add("7");
            WillReturn.Add("20");
            WillReturn.Add("10");
            //
            //
        }
        else if (InputPattern == "Input2") {
            WillReturn.Add("0");
            WillReturn.Add("0");
            WillReturn.Add("0");
            //
            //
        }
        else {
            string wkStr;
            while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
        }
        return WillReturn;
    }

    static void Main()
    {
        List<string> InputList = GetInputList();
        int L = int.Parse(InputList[0]);
        int M = int.Parse(InputList[1]);
        int N = int.Parse(InputList[2]);

        int SumMoney = L * 100 + 25 * M + N;

        int CoinCnt = 0;
        SumMoney %= 1000;
        CoinCnt += SumMoney / 100; SumMoney %= 100;
        CoinCnt += SumMoney / 25; SumMoney %= 25;
        CoinCnt += SumMoney;
        Console.WriteLine(CoinCnt);
    }
}
0