結果
問題 |
No.805 UMG
|
ユーザー |
![]() |
提出日時 | 2022-07-26 11:52:02 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 211 bytes |
コンパイル時間 | 275 ms |
コンパイル使用メモリ | 82,152 KB |
実行使用メモリ | 64,676 KB |
最終ジャッジ日時 | 2024-11-18 14:16:44 |
合計ジャッジ時間 | 2,758 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 20 WA * 5 |
ソースコード
n=int(input()) s=input() ans=0 for i in range(n-2): for j in range(i+1,n-1): if (i+j)%2==1: continue if s[i]=="U" and s[(i+j)//2]=="M" and s[j]=="G": ans+=1 print(ans)