結果

問題 No.32 貯金箱の憂鬱
ユーザー nattoumarunattoumaru
提出日時 2018-02-28 20:18:39
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 702 bytes
コンパイル時間 999 ms
コンパイル使用メモリ 67,456 KB
実行使用メモリ 23,668 KB
最終ジャッジ日時 2023-08-23 12:03:59
合計ジャッジ時間 2,671 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace programPractice
{
    class Program
    {
        public static void Main(string[] args)
        {
            int[] num = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int sum = num[0] * 100 + num[1] * 25 + num[2] * 1;

            int nPaper = sum / 1000;
            int cSum = sum - 1000 * nPaper;

            int n100 = cSum / 100;
            int cSum2 = cSum - n100 * 100;

            int n25 = cSum2 / 25;
            int n1 = cSum2 - n25 * 25;

            int nCoin = n100 + n25 + n1;
            Console.WriteLine(nCoin);
         }
    }
}
0