結果
| 問題 | No.2715 Unique Chimatagram | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2024-04-05 21:30:48 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 87 ms / 2,000 ms | 
| コード長 | 286 bytes | 
| コンパイル時間 | 296 ms | 
| コンパイル使用メモリ | 82,384 KB | 
| 実行使用メモリ | 82,180 KB | 
| 最終ジャッジ日時 | 2024-10-01 01:44:19 | 
| 合計ジャッジ時間 | 4,755 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 40 | 
ソースコード
from collections import defaultdict
res = defaultdict(int)
for _ in range(int(input())):
    s = input().strip()
    for i in range(26):
        nc = chr(ord('a')+i)
        res[''.join( sorted(s+nc)) ]+=1
for i,v in res.items():
    if v==1:
        print(i)
        exit()
print(-1)
            
            
            
        