結果
| 問題 |
No.3135 AAABC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-02 22:28:38 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 251 ms / 2,000 ms |
| コード長 | 309 bytes |
| コンパイル時間 | 435 ms |
| コンパイル使用メモリ | 82,436 KB |
| 実行使用メモリ | 122,920 KB |
| 最終ジャッジ日時 | 2025-05-02 22:28:43 |
| 合計ジャッジ時間 | 4,514 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 |
ソースコード
N=int(input())
S=int(input())
import sys
sys.setrecursionlimit(10**7)
def dfs(s):
global A
if len(s)==N:
if "A" in s and "B" in s and "C" in s:
A.append(s)
return
for c in ("A","B","C"):
dfs(s+c)
A=[]
dfs("")
if S<=len(A):
print(A[S-1])
else:
print(-1)