結果
| 問題 | No.628 Tagの勢い |
| コンテスト | |
| ユーザー |
liny_tail
|
| 提出日時 | 2020-09-18 09:50:27 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 438 bytes |
| 記録 | |
| コンパイル時間 | 146 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-22 07:39:57 |
| 合計ジャッジ時間 | 1,474 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 19 |
ソースコード
N = int(input().strip())
dic = {}
for i in range(N):
No = int(input().strip())
M, S = map(int, input().strip().split())
Tag = input().strip().split()
print('No:{} M:{} S:{} Tag:{}'.format(No, M, S, Tag))
for j in Tag:
try:
dic[j] += S
except:
dic[j] = S
dic = sorted(dic.items(), key = lambda x:x[0])
for i in sorted(dic, key = lambda x:x[1], reverse=True)[:10]:
print('{} {}'.format(i[0], i[1]))
liny_tail