結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,280 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 RE -
testcase_05 AC 68 ms
71,356 KB
testcase_06 AC 65 ms
71,272 KB
testcase_07 AC 66 ms
71,468 KB
testcase_08 AC 67 ms
71,248 KB
testcase_09 AC 66 ms
71,252 KB
testcase_10 WA -
testcase_11 AC 65 ms
71,192 KB
testcase_12 RE -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 63 ms
71,248 KB
testcase_16 AC 62 ms
71,516 KB
testcase_17 AC 64 ms
71,280 KB
testcase_18 AC 87 ms
71,460 KB
testcase_19 AC 69 ms
71,612 KB
testcase_20 AC 69 ms
71,272 KB
testcase_21 AC 69 ms
71,244 KB
testcase_22 AC 68 ms
71,376 KB
testcase_23 AC 71 ms
71,252 KB
testcase_24 AC 68 ms
71,244 KB
testcase_25 AC 71 ms
71,304 KB
testcase_26 AC 71 ms
71,336 KB
testcase_27 AC 66 ms
71,336 KB
testcase_28 RE -
testcase_29 AC 68 ms
71,512 KB
testcase_30 AC 67 ms
71,292 KB
testcase_31 AC 69 ms
71,316 KB
testcase_32 AC 68 ms
71,308 KB
testcase_33 AC 66 ms
71,564 KB
testcase_34 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys

def main():
    S = input()
    l = [0] * 7
    for ss in S:
        if ord(ss) - ord("a") > 7:
            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