結果
問題 | No.587 七対子 |
ユーザー |
|
提出日時 | 2020-08-29 14:39:09 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 48 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 161 ms |
コンパイル使用メモリ | 82,308 KB |
実行使用メモリ | 53,760 KB |
最終ジャッジ日時 | 2024-07-19 20:18:35 |
合計ジャッジ時間 | 2,821 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 35 |
ソースコード
from collections import defaultdict d = defaultdict(int) for s in input(): d[s] += 1 ans = '' for k, v in d.items(): if v == 1: ans += k elif v != 2: print('Impossible') exit() if len(ans) != 1: print('Impossible') else: print(ans)