結果

問題 No.29 パワーアップ
ユーザー yohei-kuyohei-ku
提出日時 2018-03-28 00:25:26
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 6,740 KB
実行使用メモリ 6,264 KB
最終ジャッジ日時 2023-09-07 19:15:29
合計ジャッジ時間 1,624 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
6,068 KB
testcase_01 AC 11 ms
6,224 KB
testcase_02 AC 11 ms
6,212 KB
testcase_03 AC 10 ms
6,112 KB
testcase_04 WA -
testcase_05 AC 12 ms
6,064 KB
testcase_06 AC 11 ms
5,976 KB
testcase_07 AC 10 ms
5,980 KB
testcase_08 AC 11 ms
5,972 KB
testcase_09 AC 10 ms
6,044 KB
testcase_10 AC 13 ms
6,264 KB
testcase_11 AC 11 ms
6,112 KB
testcase_12 AC 11 ms
6,068 KB
testcase_13 AC 11 ms
6,116 KB
testcase_14 AC 11 ms
6,056 KB
testcase_15 AC 11 ms
6,112 KB
testcase_16 AC 12 ms
6,224 KB
testcase_17 AC 11 ms
5,968 KB
testcase_18 AC 11 ms
5,972 KB
testcase_19 AC 11 ms
6,060 KB
testcase_20 WA -
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
AA = []
for i in range(0,N):
    AA.extend(list(map(int,raw_input().split())))
cnt,nokori = 0,0
for i in range(1,N+1):
    if AA.count(i)%2 == 0:
        cnt += AA.count(i)/2
        nokori += 0
    else:
        cnt += AA.count(i)/2
        nokori += 1
print cnt+(len(AA)-2*cnt)/4
0