結果
| 問題 |
No.99 ジャンピング駒
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-29 22:03:19 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 328 bytes |
| コンパイル時間 | 121 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 15,056 KB |
| 最終ジャッジ日時 | 2024-07-06 11:11:13 |
| 合計ジャッジ時間 | 1,434 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 4 |
ソースコード
# -*- coding:utf-8 -*- if __name__ == "__main__": n = input() x = map(int,raw_input().split()) x.sort() i = 0 ans = 0 while i < n: if i == n-1: ans +=1 break if x[i] % 2 == 1 and x[i+1] % 2 == 0: i += 2 continue elif x[i] % 2 == 0 and x[i+1] % 2 ==1: i += 2 continue i += 1 ans += 1 print ans