結果
| 問題 |
No.560 ふしぎなナップサック
|
| コンテスト | |
| ユーザー |
t8m8⛄️
|
| 提出日時 | 2017-09-28 16:31:22 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 242 bytes |
| コンパイル時間 | 3,269 ms |
| コンパイル使用メモリ | 70,272 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-30 03:13:35 |
| 合計ジャッジ時間 | 3,901 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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, 47) Warning: imported and not used: 'math' [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⛄️