結果

問題 No.805 UMG
ユーザー akitsugu777akitsugu777
提出日時 2019-12-18 10:31:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 188 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 77,108 KB
最終ジャッジ日時 2023-08-11 19:44:02
合計ジャッジ時間 4,515 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
76,048 KB
testcase_01 AC 75 ms
75,760 KB
testcase_02 AC 72 ms
75,556 KB
testcase_03 AC 75 ms
75,916 KB
testcase_04 AC 68 ms
71,536 KB
testcase_05 AC 70 ms
71,188 KB
testcase_06 AC 70 ms
71,192 KB
testcase_07 AC 75 ms
75,740 KB
testcase_08 AC 81 ms
75,752 KB
testcase_09 AC 156 ms
76,064 KB
testcase_10 AC 119 ms
71,300 KB
testcase_11 AC 72 ms
75,564 KB
testcase_12 AC 68 ms
71,188 KB
testcase_13 AC 76 ms
75,788 KB
testcase_14 AC 71 ms
71,372 KB
testcase_15 AC 85 ms
76,636 KB
testcase_16 AC 79 ms
76,404 KB
testcase_17 AC 81 ms
76,408 KB
testcase_18 AC 80 ms
76,392 KB
testcase_19 AC 79 ms
76,288 KB
testcase_20 AC 82 ms
76,636 KB
testcase_21 AC 80 ms
76,680 KB
testcase_22 AC 79 ms
76,224 KB
testcase_23 AC 178 ms
76,952 KB
testcase_24 AC 186 ms
76,896 KB
testcase_25 AC 181 ms
76,868 KB
testcase_26 AC 186 ms
76,824 KB
testcase_27 AC 188 ms
77,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = input()

c = 0
for i in range(N-2):
    for j in range(i+1, N-1):
        k = 2*j-i
        if k < N and S[i] + S[j] + S[k] == 'UMG':
            c += 1

print(c)
0