結果

問題 No.587 七対子
ユーザー Ryuto
提出日時 2017-12-20 00:03:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 51,840 KB
最終ジャッジ日時 2024-07-19 19:48:55
合計ジャッジ時間 2,374 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python

slist = list(input())

num1 = []
for s in set(slist):
    if slist.count(s) >= 3:
        print('Impossible')
        exit()
    elif slist.count(s) == 1:
        num1.append(s)

if len(num1) == 1:
    print(num1[0])
else:
    print('Impossible')
0