結果
| 問題 | No.560 ふしぎなナップサック |
| コンテスト | |
| ユーザー |
t8m8⛄️
|
| 提出日時 | 2017-09-28 16:31:22 |
| 言語 | Nim (2.2.8) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 439µs | |
| コード長 | 242 bytes |
| 記録 | |
| コンパイル時間 | 2,667 ms |
| コンパイル使用メモリ | 72,448 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-02 04:04:03 |
| 合計ジャッジ時間 | 3,863 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 39) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated] /home/judge/data/code/Main.nim(1, 53) Warning: imported and not used: 'tables' [UnusedImport] /home/judge/data/code/Main.nim(1, 28) Warning: imported and not used: 'algorithm' [UnusedImport] /home/judge/data/code/Main.nim(1, 39) Warning: imported and not used: 'future' [UnusedImport]
ソースコード
import strutils, sequtils, algorithm, future, math, tables
when isMainModule:
var
input = stdin.readline.split.map(parseint)
(m, n) = (input[0], input[1])
ans = m.float
for i in 0..<n:
ans = 2*ans/3 + (ans+1)/3
echo ans
t8m8⛄️