結果

問題 No.548 国士無双
ユーザー ys
提出日時 2018-02-10 21:55:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 475 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-17 13:50:12
合計ジャッジ時間 1,637 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

s = "abcdefghijklm"
dic = {"a":0,"b":0, "c":0, "d":0,"e":0, "f":0, "g":0,"h":0,"i":0,"j":0,"k":0,"l":0,"m":0}
S = list(input())
num, dou = 0, 0
for k in S:
    if k in dic:
        if dic[k] == 0:
            num += 1
        dic[k] += 1
        if dic[k] == 2:
            dou += 1

if num == 13:
    for i in range(13):
        print(s[i])
elif dou == 1 and num == 12:
    for i in range(13):
        if dic[s[i]] == 0:
            print(s[i])
else:
    print("Impossible")
0