結果

問題 No.2590 100000 Days of Christmas
ユーザー NyaanNyaanNyaanNyaan
提出日時 2023-12-20 13:59:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 517 ms / 2,000 ms
コード長 214 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 81,444 KB
実行使用メモリ 96,600 KB
最終ジャッジ日時 2023-12-20 13:59:17
合計ジャッジ時間 6,539 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,204 KB
testcase_01 AC 41 ms
53,204 KB
testcase_02 AC 41 ms
53,204 KB
testcase_03 AC 42 ms
53,204 KB
testcase_04 AC 41 ms
53,204 KB
testcase_05 AC 44 ms
55,360 KB
testcase_06 AC 234 ms
96,600 KB
testcase_07 AC 114 ms
75,892 KB
testcase_08 AC 517 ms
94,616 KB
testcase_09 AC 113 ms
75,896 KB
testcase_10 AC 41 ms
53,204 KB
testcase_11 AC 42 ms
53,204 KB
testcase_12 AC 41 ms
53,204 KB
testcase_13 AC 42 ms
53,204 KB
testcase_14 AC 41 ms
53,204 KB
testcase_15 AC 41 ms
53,204 KB
testcase_16 AC 41 ms
53,204 KB
testcase_17 AC 41 ms
53,204 KB
testcase_18 AC 41 ms
53,204 KB
testcase_19 AC 41 ms
53,204 KB
testcase_20 AC 485 ms
94,976 KB
testcase_21 AC 482 ms
94,808 KB
testcase_22 AC 489 ms
95,880 KB
testcase_23 AC 488 ms
94,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

N = int(input())
mp = defaultdict(int)
for i in range(N):
    mp[input()] += (N - i) * (i + 1)
ans = [(k, v) for k, v in mp.items()]
ans.sort()
for k, v in ans:
    print(v, k)
0