結果

問題 No.805 UMG
ユーザー OhnumaOhnuma
提出日時 2020-04-10 20:26:28
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 255 bytes
コンパイル時間 539 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 81,188 KB
最終ジャッジ日時 2023-08-11 19:48:36
合計ジャッジ時間 8,664 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
81,188 KB
testcase_01 AC 92 ms
76,548 KB
testcase_02 AC 77 ms
76,532 KB
testcase_03 AC 76 ms
76,516 KB
testcase_04 AC 69 ms
71,124 KB
testcase_05 AC 69 ms
71,496 KB
testcase_06 AC 67 ms
71,160 KB
testcase_07 AC 76 ms
76,568 KB
testcase_08 AC 76 ms
76,540 KB
testcase_09 AC 78 ms
76,264 KB
testcase_10 AC 68 ms
71,316 KB
testcase_11 AC 76 ms
76,256 KB
testcase_12 AC 69 ms
71,108 KB
testcase_13 AC 78 ms
76,576 KB
testcase_14 AC 68 ms
71,368 KB
testcase_15 AC 420 ms
77,332 KB
testcase_16 AC 348 ms
77,032 KB
testcase_17 AC 243 ms
77,040 KB
testcase_18 AC 538 ms
77,068 KB
testcase_19 AC 173 ms
76,548 KB
testcase_20 AC 575 ms
77,116 KB
testcase_21 AC 297 ms
77,228 KB
testcase_22 AC 349 ms
77,040 KB
testcase_23 TLE -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = input()
ret = 0
for i in range(n):
    for j in range(i+1, n):
        for k in range(j+1, n):
            if j-i!=k-j:
                continue
            if s[i]=='U' and s[j]=='M' and s[k]=='G':
                ret += 1
print(ret)
0