結果
| 問題 | No.2614 Delete ABC |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-01-26 21:40:31 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 559 bytes |
| 記録 | |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 85,112 KB |
| 実行使用メモリ | 54,216 KB |
| 最終ジャッジ日時 | 2026-04-15 00:28:35 |
| 合計ジャッジ時間 | 1,016 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 2 |
ソースコード
def check_conditions(S):
if not set(S).issubset({'A', 'B', 'C'}):
return False
while 'ABC' in S:
S = S.replace('ABC', '')
if S != '':
return False
S = 'ABC' * N
while 'A' in S and 'B' in S and 'C' in S:
S = S.replace('A', '', 1)
S = S.replace('B', '', 1)
S = S.replace('C', '', 1)
if S != '':
return False
if 'AA' in S or 'BB' in S or 'CC' in S:
return False
return True
T = int(input())
for _ in range(T):
N = int(input())
S = 'ABC' * N
print(S)