結果
問題 | No.3135 AAABC |
ユーザー |
![]() |
提出日時 | 2025-05-02 21:42:53 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 185 ms / 2,000 ms |
コード長 | 234 bytes |
コンパイル時間 | 519 ms |
コンパイル使用メモリ | 82,352 KB |
実行使用メモリ | 76,160 KB |
最終ジャッジ日時 | 2025-05-02 21:42:57 |
合計ジャッジ時間 | 3,444 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 32 |
ソースコード
from itertools import product N = int(input()) S = int(input()) i = 1 for s in product("ABC", repeat=N): if len(set(s)) != 3: continue if i == S: print(*s, sep="") break i += 1 else: print(-1)