結果
| 問題 | No.3823 Make 1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-11-23 14:58:21 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 394 ms / 2,000 ms |
| + 81µs | |
| コード長 | 332 bytes |
| 記録 | |
| コンパイル時間 | 79 ms |
| コンパイル使用メモリ | 64,420 KB |
| 実行使用メモリ | 61,876 KB |
| 最終ジャッジ日時 | 2026-11-23 14:58:25 |
| 合計ジャッジ時間 | 3,470 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge6_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 13 |
ソースコード
t=int(input())
for i in range(t):
n=int(input())
A=[int(c) for c in input()]
if (2*n-1-sum(A))%3!=0:
print("No")
continue
for i in range(n-1):
if A[i]==A[i+1]:
print("Yes")
break
else:
if n==1:
print("Yes")
else:
print("No")