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