結果
| 問題 | No.587 七対子 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-25 17:04:22 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 78 ms / 2,000 ms |
| + 154µs | |
| コード長 | 457 bytes |
| 記録 | |
| コンパイル時間 | 230 ms |
| コンパイル使用メモリ | 96,104 KB |
| 実行使用メモリ | 79,360 KB |
| 最終ジャッジ日時 | 2026-07-16 23:17:04 |
| 合計ジャッジ時間 | 4,532 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
from collections import Counter
import sys
def input(): return sys.stdin.readline().rstrip('\n')
def main():
s = input()
c = Counter(s)
ans = None
for k, v in c.items():
if v == 1:
if ans is not None:
print('Impossible')
return
ans = k
if v not in [1, 2]:
print('Impossible')
return
print(ans)
if __name__ == '__main__':
main()