結果
| 問題 | No.587 七対子 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-10-03 08:31:44 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0) |
| 結果 |
AC
|
| 実行時間 | 95 ms / 2,000 ms |
| + 267µs | |
| コード長 | 341 bytes |
| 記録 | |
| コンパイル時間 | 299 ms |
| コンパイル使用メモリ | 21,544 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-08-19 00:03:01 |
| 合計ジャッジ時間 | 5,405 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
# coding: utf-8
def main():
s = input()
d = count(s)
e = list(filter(lambda t: t[1] != 2, d.items()))
if len(e) == 1 and e[0][1] == 1:
print(e[0][0])
else:
print('Impossible')
def count(s):
return { c: len(list(filter(lambda x: x == c, s))) for c in set(s) }
if __name__ == '__main__':
main()