結果

問題 No.805 UMG
ユーザー tsuyoiboytsuyoiboy
提出日時 2019-03-26 12:17:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 248 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 81,752 KB
実行使用メモリ 61,952 KB
最終ジャッジ日時 2024-04-29 10:45:40
合計ジャッジ時間 2,510 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
57,472 KB
testcase_01 AC 40 ms
58,240 KB
testcase_02 AC 35 ms
51,840 KB
testcase_03 AC 38 ms
56,960 KB
testcase_04 WA -
testcase_05 AC 35 ms
51,712 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 38 ms
57,856 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 41 ms
57,856 KB
testcase_14 AC 37 ms
51,840 KB
testcase_15 WA -
testcase_16 AC 48 ms
60,160 KB
testcase_17 WA -
testcase_18 AC 47 ms
60,160 KB
testcase_19 AC 47 ms
60,544 KB
testcase_20 WA -
testcase_21 AC 47 ms
60,032 KB
testcase_22 AC 47 ms
60,544 KB
testcase_23 AC 114 ms
61,696 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 103 ms
61,952 KB
testcase_27 AC 122 ms
61,952 KB
権限があれば一括ダウンロードができます

ソースコード

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