結果
| 問題 |
No.587 七対子
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-04 20:17:03 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 370 bytes |
| コンパイル時間 | 270 ms |
| コンパイル使用メモリ | 82,144 KB |
| 実行使用メモリ | 66,684 KB |
| 最終ジャッジ日時 | 2024-07-03 23:20:35 |
| 合計ジャッジ時間 | 2,777 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 WA * 6 RE * 4 |
ソースコード
#!/usr/bin/env python3
import sys
def main():
S = input()
l = [0] * 7
for ss in S:
if ord(ss) - ord("a") > 7:
print("Impossible")
return
l[ord(ss) - ord("a")] += 1
if sorted(l) == [1] + [2] * 6:
print(chr(l.index(1) + ord("a")))
else:
print("Impossible")
if __name__ == '__main__':
main()