結果
| 問題 | No.2590 100000 Days of Christmas |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-06 16:53:35 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
AC
|
| 実行時間 | 630 ms / 2,000 ms |
| コード長 | 496 bytes |
| 記録 | |
| コンパイル時間 | 1,006 ms |
| コンパイル使用メモリ | 20,956 KB |
| 実行使用メモリ | 35,816 KB |
| 最終ジャッジ日時 | 2026-02-23 12:38:25 |
| 合計ジャッジ時間 | 9,481 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
from collections import defaultdict
import sys
def printe(*args, end="\n", **kwargs):
print(*args, end=end, file=sys.stderr, **kwargs)
def main():
N = int(input())
presents = [input() for _ in range(N)]
present_day = defaultdict(int)
for idx, present in enumerate(presents, 1):
present_day[present] += idx * (N - idx + 1)
printe(present_day)
for present, n in sorted(present_day.items()):
print(n, present)
if __name__ == "__main__":
main()