結果

問題 No.548 国士無双
ユーザー mokraimokrai
提出日時 2017-11-10 14:58:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 606 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 11,016 KB
実行使用メモリ 8,112 KB
最終ジャッジ日時 2023-09-19 08:43:13
合計ジャッジ時間 1,654 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,060 KB
testcase_01 AC 16 ms
7,984 KB
testcase_02 AC 16 ms
8,072 KB
testcase_03 AC 16 ms
8,028 KB
testcase_04 AC 17 ms
8,040 KB
testcase_05 AC 16 ms
8,028 KB
testcase_06 WA -
testcase_07 AC 16 ms
7,984 KB
testcase_08 AC 17 ms
8,040 KB
testcase_09 AC 17 ms
8,060 KB
testcase_10 AC 16 ms
8,108 KB
testcase_11 AC 16 ms
7,932 KB
testcase_12 AC 16 ms
8,000 KB
testcase_13 WA -
testcase_14 AC 17 ms
7,920 KB
testcase_15 AC 16 ms
7,924 KB
testcase_16 AC 16 ms
8,064 KB
testcase_17 AC 17 ms
8,112 KB
testcase_18 WA -
testcase_19 AC 16 ms
8,064 KB
testcase_20 AC 16 ms
7,948 KB
testcase_21 AC 16 ms
8,056 KB
testcase_22 AC 16 ms
7,948 KB
testcase_23 AC 16 ms
7,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sample = "abcdefghijklm"

def main():
    S = input()
    if is_include_invalid_char(S):
        print("Impossible")
        sys.exit()

    if len(set(S)) == 13:
        for s in list(sample):
            print(s)
    elif len(set(S)) == 12:
        for x, y in zip(list(sample), sorted(list(set(S)))):
            if not x == y:
                print(x)
                sys.exit()
    else:
        print("Impossible")

def is_include_invalid_char(values):
    for s in list(values):
        if not s in sample:
            return True
    return False

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