結果

問題 No.51 やる気の問題
ユーザー Maeda
提出日時 2025-04-01 11:52:48
言語 C#
(.NET 8.0.404)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 358 bytes
コンパイル時間 8,908 ms
コンパイル使用メモリ 170,188 KB
実行使用メモリ 188,592 KB
最終ジャッジ日時 2025-04-01 11:53:05
合計ジャッジ時間 11,914 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (120 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

    class Program
    {
        static void Main(string[] args)
        {
            decimal w = decimal.Parse(Console.ReadLine());
            decimal d = decimal.Parse(Console.ReadLine());
            for(decimal i = d; i > 1; i--)
            {
                w -= Math.Floor(w / (i * i));
            }
            Console.WriteLine(w);
        }
    }
0