結果
| 問題 |
No.587 七対子
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-10-26 11:31:27 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 375 bytes |
| コンパイル時間 | 396 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-19 06:02:42 |
| 合計ジャッジ時間 | 2,131 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 WA * 8 |
ソースコード
s = input()
c = {}
for i in s:
if not i in c:
c[i] = 1
else:
c[i] += 1
if max(c.values()) > 2:
print('Impossible')
elif 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('Impossible')
else:
print(*l)