結果

問題 No.51 やる気の問題
ユーザー iroganeirogane
提出日時 2019-06-26 17:27:41
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 64 ms / 5,000 ms
コード長 314 bytes
コンパイル時間 2,277 ms
コンパイル使用メモリ 99,580 KB
実行使用メモリ 24,972 KB
最終ジャッジ日時 2023-09-07 12:24:29
合計ジャッジ時間 4,882 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
22,860 KB
testcase_01 AC 62 ms
22,796 KB
testcase_02 AC 61 ms
22,788 KB
testcase_03 AC 63 ms
24,912 KB
testcase_04 AC 62 ms
22,900 KB
testcase_05 AC 62 ms
24,924 KB
testcase_06 AC 61 ms
24,900 KB
testcase_07 AC 64 ms
22,816 KB
testcase_08 AC 61 ms
24,812 KB
testcase_09 AC 60 ms
22,732 KB
testcase_10 AC 59 ms
22,780 KB
testcase_11 AC 59 ms
23,020 KB
testcase_12 AC 58 ms
22,776 KB
testcase_13 AC 60 ms
24,852 KB
testcase_14 AC 59 ms
22,892 KB
testcase_15 AC 60 ms
22,732 KB
testcase_16 AC 59 ms
24,896 KB
testcase_17 AC 57 ms
22,780 KB
testcase_18 AC 61 ms
20,712 KB
testcase_19 AC 60 ms
24,972 KB
testcase_20 AC 60 ms
22,908 KB
testcase_21 AC 59 ms
22,816 KB
testcase_22 AC 61 ms
22,720 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class No51 {
	public static void Main() {
	    double w    = double.Parse( Console.ReadLine() );
	    int d       = int.Parse( Console.ReadLine() );
	    
        for(var i = 0; i < d-1; i++){
            w -= Math.Truncate( w / Math.Pow(d-i,2) );
        }
        Console.WriteLine(w);
	}
}
0