結果
| 問題 |
No.2590 100000 Days of Christmas
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-11-23 15:17:03 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 583 ms / 2,000 ms |
| コード長 | 228 bytes |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 30,460 KB |
| 最終ジャッジ日時 | 2024-09-27 08:10:27 |
| 合計ジャッジ時間 | 5,974 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
from collections import defaultdict
presents = defaultdict(int)
N = int(input())
for i in range(N):
present = input()
presents[present] += (i + 1) * (N - i)
for p, c in sorted(presents.items()):
print(f'{c} {p}')