結果

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

ソースコード

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