結果
問題 |
No.349 干支の置き物
|
ユーザー |
![]() |
提出日時 | 2025-04-07 20:41:32 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 353 bytes |
コンパイル時間 | 814 ms |
コンパイル使用メモリ | 82,460 KB |
実行使用メモリ | 55,888 KB |
最終ジャッジ日時 | 2025-04-07 20:41:36 |
合計ジャッジ時間 | 3,478 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 29 |
ソースコード
from collections import Counter N = int(input()) A = [input() for _ in range(N)] cnt = Counter(A) print(cnt.most_common()) most_common_item = cnt.most_common()[0][1] nokori = N - most_common_item # 間:most_common_item - 1 # nokori が 間の個数以上あればよい if nokori >= most_common_item - 1: print('YES') else: print('NO')