結果
| 問題 |
No.3299 K-th MMA String
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2025-10-05 17:11:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 436 bytes |
| コンパイル時間 | 285 ms |
| コンパイル使用メモリ | 82,288 KB |
| 実行使用メモリ | 84,444 KB |
| 最終ジャッジ日時 | 2025-10-05 17:11:52 |
| 合計ジャッジ時間 | 4,911 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 10 TLE * 1 -- * 9 |
ソースコード
N, K = map(int, input().split())
cnt = 0
for i in range(1 << N):
ok = False
for j in range(N-2):
a = i & (1 << j)
b = i & (1 << (j+1))
c = i & (1 << (j+2))
if not a and b and c:
ok = True
break
if ok:
cnt += 1
if cnt == K:
bs = [('M' if i & (1 << j) else 'A') for j in range(N)]
print(''.join(reversed(bs)))
break
norioc