結果
| 問題 | No.560 ふしぎなナップサック |
| コンテスト | |
| ユーザー |
t8m8⛄️
|
| 提出日時 | 2017-09-28 16:31:22 |
| 言語 | Nim (2.2.8) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 242 bytes |
| 記録 | |
| コンパイル時間 | 2,888 ms |
| コンパイル使用メモリ | 72,320 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-19 20:39:38 |
| 合計ジャッジ時間 | 3,348 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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⛄️