結果
問題 | No.51 やる気の問題 |
ユーザー | irogane |
提出日時 | 2019-06-26 17:27:41 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 30 ms / 5,000 ms |
コード長 | 314 bytes |
コンパイル時間 | 1,674 ms |
コンパイル使用メモリ | 103,296 KB |
実行使用メモリ | 19,200 KB |
最終ジャッジ日時 | 2024-06-25 06:28:45 |
合計ジャッジ時間 | 3,057 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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); } }