結果

問題 No.2590 100000 Days of Christmas
ユーザー hiro1729hiro1729
提出日時 2023-12-18 17:42:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 490 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 534 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 96,612 KB
最終ジャッジ日時 2023-12-18 17:42:49
合計ジャッジ時間 5,881 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,332 KB
testcase_01 AC 40 ms
53,332 KB
testcase_02 AC 39 ms
53,332 KB
testcase_03 AC 39 ms
53,332 KB
testcase_04 AC 39 ms
53,332 KB
testcase_05 AC 41 ms
55,484 KB
testcase_06 AC 217 ms
96,612 KB
testcase_07 AC 110 ms
76,028 KB
testcase_08 AC 442 ms
94,868 KB
testcase_09 AC 115 ms
76,032 KB
testcase_10 AC 40 ms
53,332 KB
testcase_11 AC 38 ms
53,332 KB
testcase_12 AC 39 ms
53,332 KB
testcase_13 AC 39 ms
53,332 KB
testcase_14 AC 38 ms
53,332 KB
testcase_15 AC 38 ms
53,332 KB
testcase_16 AC 38 ms
53,332 KB
testcase_17 AC 39 ms
53,332 KB
testcase_18 AC 39 ms
53,332 KB
testcase_19 AC 38 ms
53,332 KB
testcase_20 AC 445 ms
95,220 KB
testcase_21 AC 490 ms
95,048 KB
testcase_22 AC 428 ms
96,264 KB
testcase_23 AC 476 ms
95,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
N = int(input())
ans = defaultdict(int)
for i in range(N):
	S = input()
	ans[S] += (i + 1) * (N - i)
ans = list(ans.items())
ans.sort()
for i, j in ans:
	print(j, i)
0