結果

問題 No.548 国士無双
ユーザー 双六
提出日時 2020-08-30 02:41:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 567 bytes
コンパイル時間 354 ms
コンパイル使用メモリ 82,252 KB
実行使用メモリ 55,452 KB
最終ジャッジ日時 2024-11-14 17:50:17
合計ジャッジ時間 2,091 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	S = input()
	if len(S) <= 12:
		print("Impossible")
		return

	table = [0] * 13
	for i in S:
		table[ord(i) - 97] = 1

	if sum(table) <= 11:
		print("Impossible")
		return

	if sum(table) == 13:
		for i in range(13):
			print(chr(97 + i))

		return

	ans = table.index(0)
	print(chr(97 + ans))


if __name__ == '__main__':
	main()
0