結果
| 問題 |
No.2590 100000 Days of Christmas
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-30 17:57:21 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 529 ms / 2,000 ms |
| コード長 | 212 bytes |
| コンパイル時間 | 415 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 32,100 KB |
| 最終ジャッジ日時 | 2024-09-30 17:37:55 |
| 合計ジャッジ時間 | 6,891 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
N=int(input())
S=[input() for _ in range(N)]
from collections import defaultdict
ans=defaultdict(int)
for i,s in enumerate(S,1):
ans[s]+=i*(N-i+1)
ans=sorted(list(ans.items()))
for k,v in ans:
print(v,k)