結果

問題 No.805 UMG
ユーザー tsuyoiboy
提出日時 2019-03-26 12:14:46
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 248 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 82,252 KB
実行使用メモリ 69,408 KB
最終ジャッジ日時 2024-11-18 13:35:03
合計ジャッジ時間 2,892 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 6 RE * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
N=int(input())
S=list(input())
ans=0
for i in range(N):#スタートの添え字
    for d in range((N-i)-1//2):
        if S[i]=="U":
            if S[i+d]=="M" and S[i+2*d]=="G":
                ans+=1
print(ans)
0