結果

問題 No.587 七対子
ユーザー kept1994kept1994
提出日時 2022-05-04 20:17:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 370 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 71,664 KB
最終ジャッジ日時 2023-09-17 01:01:51
合計ジャッジ時間 3,647 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
70,956 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 70 ms
71,012 KB
testcase_06 AC 66 ms
70,972 KB
testcase_07 AC 65 ms
70,976 KB
testcase_08 AC 62 ms
70,948 KB
testcase_09 AC 62 ms
70,988 KB
testcase_10 WA -
testcase_11 AC 61 ms
70,760 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 62 ms
71,080 KB
testcase_16 AC 63 ms
70,964 KB
testcase_17 AC 61 ms
70,912 KB
testcase_18 AC 61 ms
70,976 KB
testcase_19 AC 63 ms
70,988 KB
testcase_20 AC 61 ms
70,880 KB
testcase_21 AC 60 ms
70,756 KB
testcase_22 AC 61 ms
70,924 KB
testcase_23 AC 60 ms
70,996 KB
testcase_24 AC 60 ms
70,940 KB
testcase_25 AC 62 ms
71,020 KB
testcase_26 AC 60 ms
71,008 KB
testcase_27 AC 60 ms
70,976 KB
testcase_28 AC 62 ms
70,984 KB
testcase_29 AC 63 ms
70,920 KB
testcase_30 AC 61 ms
70,884 KB
testcase_31 AC 60 ms
71,040 KB
testcase_32 AC 61 ms
71,092 KB
testcase_33 AC 61 ms
70,996 KB
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys

def main():
    S = input()
    l = [0] * 7
    for ss in S:
        if ord(ss) - ord("a") > 6:
            print("Impossible")
            return
        l[ord(ss) - ord("a")] += 1
    if sorted(l) == [1] + [2] * 6:
        print(chr(l.index(1) + ord("a")))
    else:
        print("Impossible")

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