結果

問題 No.2715 Unique Chimatagram
ユーザー kk0414kk0414
提出日時 2024-04-05 21:41:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 444 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 73,004 KB
最終ジャッジ日時 2024-04-05 21:41:33
合計ジャッジ時間 6,607 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
53,460 KB
testcase_01 AC 44 ms
53,460 KB
testcase_02 AC 40 ms
53,460 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 40 ms
53,460 KB
testcase_06 AC 41 ms
55,612 KB
testcase_07 AC 40 ms
53,460 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 62 ms
68,856 KB
testcase_11 AC 60 ms
68,856 KB
testcase_12 WA -
testcase_13 AC 61 ms
70,972 KB
testcase_14 WA -
testcase_15 AC 60 ms
68,856 KB
testcase_16 AC 61 ms
68,856 KB
testcase_17 AC 66 ms
68,856 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 58 ms
68,856 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 61 ms
68,856 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 40 ms
53,460 KB
testcase_34 AC 43 ms
53,460 KB
testcase_35 AC 45 ms
53,460 KB
testcase_36 AC 43 ms
53,460 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 68 ms
73,004 KB
testcase_42 AC 58 ms
66,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
n = int(input())

d = defaultdict(int)

for _ in range(n):
    L = [0]*26
    for si in input():
        x = ord(si) - ord("a")
        L[x] += 1
    d[tuple(L)] += 1

for k in d.keys():
    if d[k] == 1:
        ans = ""
        for i,ai in enumerate(k):
            if ai > 0:
                sai = chr(i+ord("a"))
                ans += sai
        ans += "a"
        print(ans)
        exit()
print("-1")
0