結果

問題 No.805 UMG
ユーザー tempura_pptempura_pp
提出日時 2019-03-17 16:07:32
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 248 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 79,108 KB
最終ジャッジ日時 2023-08-11 19:04:09
合計ジャッジ時間 5,376 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,092 KB
testcase_01 AC 77 ms
71,268 KB
testcase_02 AC 82 ms
71,224 KB
testcase_03 AC 75 ms
71,012 KB
testcase_04 AC 77 ms
71,100 KB
testcase_05 AC 78 ms
71,452 KB
testcase_06 AC 77 ms
71,252 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 75 ms
71,356 KB
testcase_13 RE -
testcase_14 AC 76 ms
71,088 KB
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve() : 
    N = int(input())
    S = input()
    ans = 0
    for i in range(N) :
        if S[i]!='U' : continue
        K = (N-i)//2
        for j in range(K+1) : 
            if S[i+j]=='M' and S[i+2*j]=='G' : ans+=1
    print(ans)
solve()
0