結果
問題 |
No.120 傾向と対策:門松列(その1)
|
ユーザー |
![]() |
提出日時 | 2017-01-21 22:44:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 561 bytes |
コンパイル時間 | 116 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-23 04:33:23 |
合計ジャッジ時間 | 7,688 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 4 |
ソースコード
T = int(input()) def kado(): N = int(input()) L = list(map(int, input().strip().split(" "))) total = 0 for i in range(len(L)): if L[i] == 0: continue for j in range(i+1, len(L)): for k in range(j+1, len(L)): if L[i] == 0 or L[j] == 0 or L[k] == 0: break if (L[i] != L[j]) and (L[j] != L[k]) and (L[k] != L[i]): L[i] = L[j] = L[k] = 0 total += 1 return total print("\n".join([str(kado()) for i in range(T)]))