結果
| 問題 | No.51 やる気の問題 |
| コンテスト | |
| ユーザー |
irogane
|
| 提出日時 | 2019-06-26 17:27:41 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 23 ms / 5,000 ms |
| コード長 | 314 bytes |
| 記録 | |
| コンパイル時間 | 839 ms |
| コンパイル使用メモリ | 107,440 KB |
| 実行使用メモリ | 28,060 KB |
| 最終ジャッジ日時 | 2026-03-11 13:52:07 |
| 合計ジャッジ時間 | 2,103 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}
irogane