結果
| 問題 |
No.99 ジャンピング駒
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-24 13:19:35 |
| 言語 | Python2 (2.7.18) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 408 bytes |
| コンパイル時間 | 195 ms |
| コンパイル使用メモリ | 6,784 KB |
| 実行使用メモリ | 14,872 KB |
| 最終ジャッジ日時 | 2024-11-17 20:34:10 |
| 合計ジャッジ時間 | 1,571 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 6 |
ソースコード
#!/usr/bin/python # -*- coding: utf-8 -*- N = int(raw_input()) arr = map(int, raw_input().split()) arr.sort() ### sub def subcheck(i): if len(arr) == i: print len(arr) exit() if arr[i+1] % 2 == arr[i+2] % 2: sub(i+1) else: arr.pop(i+1) arr.pop(i+1) print arr ### main while len(arr) >= 2: if arr[0] % 2 == arr[1] % 2: subcheck(0) else: arr.pop(0) arr.pop(0) print arr print len(arr)