結果

問題 No.2590 100000 Days of Christmas
ユーザー hibit_athibit_at
提出日時 2023-12-20 19:02:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 488 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 96,612 KB
最終ジャッジ日時 2023-12-20 19:03:00
合計ジャッジ時間 5,648 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,460 KB
testcase_01 AC 40 ms
53,460 KB
testcase_02 AC 39 ms
53,460 KB
testcase_03 AC 40 ms
53,460 KB
testcase_04 AC 38 ms
53,456 KB
testcase_05 AC 41 ms
55,612 KB
testcase_06 AC 225 ms
96,612 KB
testcase_07 AC 109 ms
76,156 KB
testcase_08 AC 458 ms
94,872 KB
testcase_09 AC 110 ms
76,160 KB
testcase_10 AC 39 ms
53,460 KB
testcase_11 AC 38 ms
53,460 KB
testcase_12 AC 38 ms
53,460 KB
testcase_13 AC 38 ms
53,460 KB
testcase_14 AC 38 ms
53,460 KB
testcase_15 AC 38 ms
53,460 KB
testcase_16 AC 38 ms
53,460 KB
testcase_17 AC 38 ms
53,460 KB
testcase_18 AC 39 ms
53,460 KB
testcase_19 AC 38 ms
53,460 KB
testcase_20 AC 488 ms
95,224 KB
testcase_21 AC 460 ms
95,056 KB
testcase_22 AC 440 ms
96,272 KB
testcase_23 AC 452 ms
95,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

from collections import defaultdict

d = defaultdict(int)

for i in range(n):
    s = input()
    # d[1] = 1
    d[s] += (i+1)*(n-i)

ans = sorted(d.items())

for k,v in ans:
    print(v, k)
0