結果

問題 No.587 七対子
コンテスト
ユーザー akitsugu777
提出日時 2018-10-26 11:30:41
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 301 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 61 ms
コンパイル使用メモリ 14,848 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2026-09-26 13:22:01
合計ジャッジ時間 3,125 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

s = input()

c = {}
for i in s:
    if not i in c:
        c[i] = 1
    else:
        c[i] += 1

if max(c.values()) <= 2:
    x = min(c.values())
    l = []
    for i in c:
        if x == c[i]:
            l.append(i)
            if len(l) < 2:
                print(*l)
else:
    print('Impossible')
0