結果
| 問題 | No.587 七対子 |
| コンテスト | |
| ユーザー |
koheijkt
|
| 提出日時 | 2026-06-08 20:06:11 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 341 bytes |
| 記録 | |
| コンパイル時間 | 273 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 52,480 KB |
| 最終ジャッジ日時 | 2026-06-08 20:06:15 |
| 合計ジャッジ時間 | 2,608 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 35 |
ソースコード
S = input()
cnt = [0]*26
for s in S:
cnt[ord(s) - 97] += 1
print(cnt)
cnt2 = 0
cnt1 = 0
for i in range(26):
x = cnt[i]
if x == 2:
cnt2 += 1
if x == 1:
if cnt1 == 0:
cnt1 = i
else:
print('Impossible')
if cnt2 == 6:
print(chr(97 + cnt1))
else:
print('Impossible')
koheijkt