結果
| 問題 |
No.51 やる気の問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-30 13:10:24 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 271 bytes |
| コンパイル時間 | 3,120 ms |
| コンパイル使用メモリ | 66,516 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 05:41:33 |
| 合計ジャッジ時間 | 3,855 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 28) Warning: imported and not used: 'algorithm' [UnusedImport]
ソースコード
import sequtils, strutils, algorithm, math
var
w = readLine(stdin).parseFloat
d = readLine(stdin).parseFloat
yaruki:float
for i in countdown(int(d), 1):
yaruki = w / pow(float(i), 2)
w -= floor(yaruki)
if i == 1:
echo int(floor(yaruki))