結果

問題 No.587 七対子
コンテスト
ユーザー ikedakojiro
提出日時 2017-11-21 02:54:54
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 610 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 354 ms
コンパイル使用メモリ 20,696 KB
実行使用メモリ 35,624 KB
最終ジャッジ日時 2026-05-20 15:17:27
合計ジャッジ時間 27,731 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 35
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/env python
import fileinput
import itertools
import numpy as np
from collections import Counter


#print(fileinput.input())
txt_input = input_line()

for line in fileinput.input():
    line = line.replace('\n','')
    txt_input.append(line)

#print(txt_input, end='')

#標準入力からの取り込み
S = list(txt_input[0])

S.sort()

#print(S)
count = 0
lst =[]
letter = ''

S_unique = list(set(S))
if len(S) - len(S_unique) == 6:
    dct = Counter(S)
    search_letter = 1
    for name, age in dct.items():
        if age == search_letter:
            print(name)
else:
    print('Impossible')
0