結果

問題 No.51 やる気の問題
ユーザー suzu
提出日時 2023-04-21 12:41:46
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 700 bytes
コンパイル時間 2,291 ms
コンパイル使用メモリ 107,408 KB
実行使用メモリ 25,868 KB
最終ジャッジ日時 2024-11-06 08:38:48
合計ジャッジ時間 3,353 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 RE * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
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