結果

問題 No.51 やる気の問題
ユーザー qwrtpsfgqwrtpsfg
提出日時 2017-08-13 09:43:35
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 462 bytes
コンパイル時間 1,072 ms
コンパイル使用メモリ 109,492 KB
実行使用メモリ 26,268 KB
最終ジャッジ日時 2024-04-21 09:51:32
合計ジャッジ時間 3,061 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
25,892 KB
testcase_01 AC 30 ms
22,200 KB
testcase_02 AC 33 ms
25,892 KB
testcase_03 AC 33 ms
24,112 KB
testcase_04 AC 31 ms
23,784 KB
testcase_05 AC 57 ms
24,296 KB
testcase_06 AC 48 ms
24,032 KB
testcase_07 AC 49 ms
26,124 KB
testcase_08 AC 41 ms
24,036 KB
testcase_09 AC 71 ms
23,984 KB
testcase_10 AC 43 ms
26,148 KB
testcase_11 AC 41 ms
26,000 KB
testcase_12 AC 50 ms
26,144 KB
testcase_13 AC 51 ms
26,140 KB
testcase_14 AC 45 ms
24,164 KB
testcase_15 AC 60 ms
23,784 KB
testcase_16 AC 38 ms
24,032 KB
testcase_17 AC 33 ms
26,268 KB
testcase_18 AC 63 ms
26,116 KB
testcase_19 AC 64 ms
23,832 KB
testcase_20 AC 48 ms
23,780 KB
testcase_21 AC 36 ms
24,112 KB
testcase_22 AC 71 ms
23,952 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;

public class yukicoder
{
    public static void Main()
    {
        decimal w = decimal.Parse(Console.ReadLine().Trim());
        decimal d = decimal.Parse(Console.ReadLine().Trim());

        while(true)
        {
            if(d == 1)
                break;
            
            w = w - Math.Floor(w / (d * d));
            d--;
        }
        
        Console.WriteLine(w);
    }
}
0