結果
| 問題 |
No.548 国士無双
|
| コンテスト | |
| ユーザー |
toyuzuko
|
| 提出日時 | 2020-09-16 21:26:31 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 449 bytes |
| コンパイル時間 | 353 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-22 03:37:34 |
| 合計ジャッジ時間 | 1,668 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
S = input()
D = [0] * 13
for s in S:
D[ord(s) - 97] += 1
z = 0
t = 0
p = None
for i in range(13):
if D[i] == 0:
z += 1
p = chr(i + 97)
elif D[i] == 1:
continue
elif D[i] == 2:
t += 1
else:
print('Impossible')
break
else:
if z == t == 0:
for s in 'abcdefghijklm':
print(s)
elif z == 1 and t == 1:
print(p)
else:
print('Impossible')
toyuzuko