結果

問題 No.587 七対子
ユーザー 141sksk
提出日時 2019-11-12 23:16:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 350 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-19 14:55:38
合計ジャッジ時間 2,117 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():

    S = input()
    new_str = sorted(S)
    cnt = 0
    ans = ""
    for i in range(12):
        if new_str[i] == new_str[i + 1]:
            cnt += 1
        elif new_str.count(new_str[i]) == 1:
            ans = new_str[i]
    if cnt != 6:
        print("Impossible")
    else:
        print(ans)

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