結果
| 問題 | 
                            No.587 七対子
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2017-11-03 22:49:39 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 257 bytes | 
| コンパイル時間 | 153 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-11-22 16:10:27 | 
| 合計ジャッジ時間 | 2,210 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 26 WA * 9 | 
ソースコード
from itertools import groupby
s = input()
freq = [len(list(group)) for key, group in groupby(s)]
f = {len(list(group)):key for key, group in groupby(s)}
num2 = len(list(filter(lambda x :x==2,freq)))
if num2==6:
    print(f[1])
else:
    print("Impossible")