結果
問題 | No.706 多眼生物の調査 |
ユーザー |
|
提出日時 | 2021-08-28 02:20:17 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 116 ms / 2,000 ms |
コード長 | 483 bytes |
コンパイル時間 | 165 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-21 10:05:59 |
合計ジャッジ時間 | 1,041 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
n=int(input())lst=[]for i in range(n):tmp=0s=input()for j in s:if j=="(":continueif j=="^":tmp+=1elif j==")":lst.append(tmp)# print(lst)breakdef zen(lst):ans_lst=dict()for i in lst:if i not in ans_lst:ans_lst[i]=1else:ans_lst[i]+=1return ans_lst# print(zen(lst))zz=zen(lst)zz1=sorted(zz.items(),reverse=True,key=lambda x:(x[1],x[0]))print(zz1[0][0])