結果
問題 | No.99 ジャンピング駒 |
ユーザー | toshiro_yanagi |
提出日時 | 2018-06-09 18:53:30 |
言語 | Nim (2.0.2) |
結果 |
AC
|
実行時間 | 31 ms / 5,000 ms |
コード長 | 242 bytes |
コンパイル時間 | 4,125 ms |
コンパイル使用メモリ | 68,936 KB |
実行使用メモリ | 12,532 KB |
最終ジャッジ日時 | 2023-09-13 02:19:03 |
合計ジャッジ時間 | 5,131 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 31 ms
12,468 KB |
testcase_01 | AC | 31 ms
12,412 KB |
testcase_02 | AC | 30 ms
12,532 KB |
testcase_03 | AC | 30 ms
12,400 KB |
testcase_04 | AC | 30 ms
12,360 KB |
testcase_05 | AC | 31 ms
12,428 KB |
コンパイルメッセージ
/home/judge/data/code/Main.nim(9, 3) Warning: The bare except clause is deprecated; use `except CatchableError:` instead [BareExcept]
ソースコード
import strutils, sequtils, tables, math let N, X = stdin.readLine.split.map parseInt var dic = initCountTable[int]() for x in X: dic.inc x.abs mod 2 var ans = 0 for i in 0 ..< 2: try: ans += -1 ^ i * dic[i] except: discard echo ans.abs