結果

問題 No.51 やる気の問題
ユーザー suzusuzu
提出日時 2023-04-21 12:41:46
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 700 bytes
コンパイル時間 1,711 ms
コンパイル使用メモリ 106,916 KB
実行使用メモリ 25,880 KB
最終ジャッジ日時 2024-04-24 01:59:14
合計ジャッジ時間 2,941 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
25,676 KB
testcase_01 AC 20 ms
23,980 KB
testcase_02 AC 20 ms
23,388 KB
testcase_03 AC 20 ms
23,768 KB
testcase_04 AC 19 ms
23,776 KB
testcase_05 RE -
testcase_06 AC 21 ms
25,572 KB
testcase_07 AC 21 ms
23,640 KB
testcase_08 AC 21 ms
23,512 KB
testcase_09 RE -
testcase_10 AC 21 ms
23,632 KB
testcase_11 AC 21 ms
23,604 KB
testcase_12 AC 20 ms
25,868 KB
testcase_13 AC 22 ms
23,828 KB
testcase_14 AC 20 ms
23,704 KB
testcase_15 RE -
testcase_16 AC 20 ms
21,560 KB
testcase_17 AC 20 ms
23,652 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 23 ms
25,880 KB
testcase_21 AC 21 ms
23,644 KB
testcase_22 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;

namespace yukicoder
{
    class Program
    {

        static void Main(string[] args)
        {
            int W = int.Parse(Console.ReadLine());
            int D = int.Parse(Console.ReadLine());
            int[] chk = new int[D];
            
            int remainingDay = D;
            int remainingWork = W;
            
            for(int i = 0;i < D;i++)
            {
              int todayWork = remainingWork / (remainingDay * remainingDay);
              chk[i] = todayWork;
              
              --remainingDay;
              remainingWork -= todayWork;
              
            }
            Console.WriteLine(chk[D-1]);
        }
    }
}
0