結果
| 問題 |
No.587 七対子
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-03 22:52:03 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 282 bytes |
| コンパイル時間 | 96 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-22 16:13:30 |
| 合計ジャッジ時間 | 2,154 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 WA * 10 |
ソースコード
from itertools import groupby
s = input()
se = set(s)
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 and len(s)==7:
print(f[1])
else:
print("Impossible")