結果
問題 | No.2715 Unique Chimatagram |
ユーザー | Ekiben542 |
提出日時 | 2024-04-05 22:27:53 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 602 bytes |
コンパイル時間 | 436 ms |
コンパイル使用メモリ | 81,700 KB |
実行使用メモリ | 63,896 KB |
最終ジャッジ日時 | 2024-04-05 22:28:01 |
合計ジャッジ時間 | 7,086 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 38 ms
53,460 KB |
testcase_01 | AC | 38 ms
53,460 KB |
testcase_02 | AC | 39 ms
53,460 KB |
testcase_03 | AC | 40 ms
53,460 KB |
testcase_04 | AC | 38 ms
53,460 KB |
testcase_05 | AC | 37 ms
53,460 KB |
testcase_06 | AC | 37 ms
53,460 KB |
testcase_07 | AC | 37 ms
53,460 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
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 | 38 ms
53,460 KB |
testcase_34 | AC | 38 ms
53,460 KB |
testcase_35 | AC | 38 ms
53,460 KB |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | AC | 51 ms
61,628 KB |
testcase_40 | WA | - |
testcase_41 | AC | 54 ms
63,880 KB |
testcase_42 | AC | 55 ms
63,880 KB |
ソースコード
def find_string(strings): char_count = {} for string in strings: for char in string: char_count[char] = char_count.get(char, 0) + 1 unique_char = None for char, count in char_count.items(): if count == 1: unique_char = char break if unique_char is None: return -1 for string in strings: if unique_char in string: string += 'a' return ''.join(sorted(string)) N = int(input()) strings = [] for _ in range(N): strings.append(input().strip()) result = find_string(strings) print(result)