結果
問題 |
No.2715 Unique Chimatagram
|
ユーザー |
|
提出日時 | 2024-04-05 21:41:26 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 444 bytes |
コンパイル時間 | 311 ms |
コンパイル使用メモリ | 82,500 KB |
実行使用メモリ | 71,956 KB |
最終ジャッジ日時 | 2024-10-01 01:55:58 |
合計ジャッジ時間 | 6,408 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 23 |
ソースコード
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")