結果

問題 No.1453 手助け
ユーザー 吉田英陽吉田英陽
提出日時 2021-03-31 21:13:59
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 1,606 bytes
コンパイル時間 3,834 ms
コンパイル使用メモリ 104,748 KB
実行使用メモリ 22,840 KB
最終ジャッジ日時 2023-08-21 22:07:22
合計ジャッジ時間 5,146 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
22,788 KB
testcase_01 AC 57 ms
20,888 KB
testcase_02 AC 57 ms
22,836 KB
testcase_03 AC 56 ms
18,780 KB
testcase_04 AC 57 ms
20,824 KB
testcase_05 AC 56 ms
20,788 KB
testcase_06 AC 56 ms
20,780 KB
testcase_07 AC 56 ms
22,724 KB
testcase_08 AC 57 ms
20,888 KB
testcase_09 AC 57 ms
20,736 KB
testcase_10 AC 57 ms
20,808 KB
testcase_11 AC 57 ms
20,796 KB
testcase_12 AC 57 ms
20,900 KB
testcase_13 AC 57 ms
20,712 KB
testcase_14 AC 57 ms
20,808 KB
testcase_15 AC 56 ms
20,728 KB
testcase_16 AC 56 ms
20,772 KB
testcase_17 AC 56 ms
20,728 KB
testcase_18 AC 58 ms
22,840 KB
testcase_19 AC 56 ms
18,696 KB
testcase_20 AC 57 ms
20,724 KB
testcase_21 AC 56 ms
20,776 KB
testcase_22 AC 56 ms
18,716 KB
testcase_23 AC 56 ms
18,732 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;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp189
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split();
            int a = int.Parse(str[0]);
            int b = int.Parse(str[1]);
            int c = int.Parse(str[2]);
            int d = int.Parse(str[3]);
            int e = int.Parse(str[4]);
            int kin = 0;
            int x = 0;
            int kosuu = (b - c) * a;
            for(int i = 1; i <= kosuu; i++)
            {
                if (i == 1)
                {
                    kin += d;
                    x = d;
                }
                else
                {
                    if (i % 10 == 0)
                    {
                        if (e <= x)
                        {
                            if (x - e > 0)
                            {
                                kin += (x - e);
                                x = x - e;
                            }
                            else
                            {
                                x = 0;
                            }
                        }
                        else
                        {
                            kin += x;

                        }
                    }
                    else
                    {
                        kin += x;
                    }
                }
            }
            Console.WriteLine(kin);
            Console.ReadLine();
        }
    }
}
0