結果
問題 |
No.9000 Hello World! (テスト用)
|
ユーザー |
|
提出日時 | 2017-08-18 03:12:13 |
言語 | Nim (2.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 519 bytes |
コンパイル時間 | 3,884 ms |
コンパイル使用メモリ | 88,628 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 02:47:25 |
合計ジャッジ時間 | 4,477 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 4 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(22, 5) template/generic instantiation of `hoge` from here /home/judge/data/code/Main.nim(10, 15) Warning: use the nimble packages `malebolgia`, `taskpools` or `weave` instead; threadpool is deprecated [Deprecated] /home/judge/data/code/Main.nim(2, 33) Warning: imported and not used: 'osproc' [UnusedImport]
ソースコード
{.experimental.} import strutils,sequtils,macros,osproc const p = @[ "echo 'threads:on' > nim.cfg", "echo 'threads:on' > ../nim.cfg", ] const str = p.mapIt(gorge(it)) echo str template hoge() = import math,threadpool proc term(k: float): float = 4 * math.pow(-1, k) / (2*k + 1) proc pi(n: int): float = var ch = newSeq[float](n+1) parallel: for k in 0..ch.high: ch[k] = spawn term(float(k)) for k in 0..ch.high: result += ch[k] let f = formatFloat(pi(5000)) echo f hoge()