結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
![]() |
提出日時 | 2025-03-31 17:47:13 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 388 bytes |
コンパイル時間 | 633 ms |
コンパイル使用メモリ | 83,072 KB |
実行使用メモリ | 85,760 KB |
最終ジャッジ日時 | 2025-03-31 17:48:09 |
合計ジャッジ時間 | 1,642 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 4 |
ソースコード
n = int(input()) x = list(map(int, input().split())) x.sort() has_adjacent = False for i in range(n - 1): if x[i+1] - x[i] == 1 and (x[i] % 2 != x[i+1] % 2): has_adjacent = True break even = 0 odd = 0 for num in x: if num % 2 == 0: even += 1 else: odd += 1 if has_adjacent: print((even + odd) % 2) else: print((even % 2) + (odd % 2))