結果
| 問題 | No.587 七対子 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-04 20:17:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 370 bytes |
| 記録 | |
| コンパイル時間 | 159 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-07-03 23:21:09 |
| 合計ジャッジ時間 | 2,408 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 26 WA * 9 |
ソースコード
#!/usr/bin/env python3
import sys
def main():
S = input()
l = [0] * 7
for ss in S:
if ord(ss) - ord("a") > 6:
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()