結果
| 問題 |
No.805 UMG
|
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2022-01-21 04:36:12 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 319 bytes |
| コンパイル時間 | 295 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 21,632 KB |
| 最終ジャッジ日時 | 2024-11-18 14:14:48 |
| 合計ジャッジ時間 | 17,386 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 TLE * 5 |
ソースコード
n=int(input())
s=input()
ans=0
for kankaku in range(len(s)):
if 3 + 2*kankaku > len(s):
break
for i in range(len(s)):
j=i+1+kankaku
k=j+1+kankaku
if k >= len(s):
break
if s[i] == 'U' and s[j] == 'M' and s[k] == 'G':
ans+=1
print(ans)
lllllll88938494