結果

問題 No.2590 100000 Days of Christmas
ユーザー 👑 rin204rin204
提出日時 2023-12-18 00:12:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 317 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 95,792 KB
最終ジャッジ日時 2023-12-18 00:12:15
合計ジャッジ時間 4,864 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,332 KB
testcase_01 AC 35 ms
53,332 KB
testcase_02 AC 39 ms
53,332 KB
testcase_03 AC 35 ms
53,332 KB
testcase_04 AC 41 ms
53,332 KB
testcase_05 AC 37 ms
53,332 KB
testcase_06 AC 251 ms
95,792 KB
testcase_07 AC 131 ms
75,744 KB
testcase_08 AC 317 ms
94,748 KB
testcase_09 AC 105 ms
75,748 KB
testcase_10 AC 35 ms
53,332 KB
testcase_11 AC 35 ms
53,332 KB
testcase_12 AC 35 ms
53,332 KB
testcase_13 AC 35 ms
53,332 KB
testcase_14 AC 35 ms
53,332 KB
testcase_15 AC 62 ms
53,332 KB
testcase_16 AC 35 ms
53,332 KB
testcase_17 AC 35 ms
53,332 KB
testcase_18 AC 35 ms
53,332 KB
testcase_19 AC 35 ms
53,332 KB
testcase_20 AC 287 ms
93,956 KB
testcase_21 AC 296 ms
94,932 KB
testcase_22 AC 302 ms
94,616 KB
testcase_23 AC 284 ms
93,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
cnt = {}
for i in range(1, n + 1):
    S = input()
    cnt[S] = cnt.get(S, 0) + i * (n + 1 - i)

for key in sorted(cnt.keys()):
    print(cnt[key], key)
0