結果
問題 | No.3135 AAABC |
ユーザー |
👑 |
提出日時 | 2025-04-22 21:28:33 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,767 ms / 2,000 ms |
コード長 | 189 bytes |
コンパイル時間 | 102 ms |
コンパイル使用メモリ | 12,160 KB |
実行使用メモリ | 10,368 KB |
最終ジャッジ日時 | 2025-05-02 20:50:57 |
合計ジャッジ時間 | 8,622 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 32 |
ソースコード
R=range I=input N=int(I()) S=int(I()) for i in R(3**N): j,D=i,{} for n in R(N):D[j%3]=0;j//=3 if len(D)>2:S-=1 if S<1:exit(print(''.join("ABC"[i//3**(N-1-n)%3]for n in R(N)))) print(-1)