結果
| 問題 |
No.805 UMG
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-09 11:09:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 537 ms / 2,000 ms |
| コード長 | 197 bytes |
| コンパイル時間 | 348 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-18 13:51:14 |
| 合計ジャッジ時間 | 4,362 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
n = int(input())
s = input()
x = 0
for i in range(n):
if s[i] == 'U':
for j in range((n-i+1)//2):
if s[i + j] == 'M' and s[i + j*2] == 'G':
x += 1
print(x)