結果
| 問題 |
No.587 七対子
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-22 23:16:08 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 2,000 ms |
| コード長 | 490 bytes |
| コンパイル時間 | 138 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-07-19 20:07:59 |
| 合計ジャッジ時間 | 2,260 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
s=input()
dct={}
for i in range(len(s)):
if s[i] in dct.keys():
dct[s[i]] = dct[s[i]]+1
else:
dct[s[i]]=1
possible=None
for i in dct.keys():
if dct[i] == 2:
pass
elif dct[i] > 2:
print("Impossible")
exit()
elif dct[i] < 1:
print("Impossible")
exit()
elif (dct[i] == 1) and possible==None:
possible=i
elif (dct[i] == 1) and possible!=None:
print("Impossible")
exit()
print(possible)