結果
| 問題 | No.805 UMG |
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-07-26 11:52:35 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 103 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 21,376 KB |
| 最終ジャッジ日時 | 2024-11-18 14:17:26 |
| 合計ジャッジ時間 | 17,048 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 TLE * 5 |
ソースコード
n=int(input())
s=input()
ans=0
for i in range(n-1):
for j in range(i+1,n):
if (i+j)%2==1:
continue
if s[i]=="U" and s[(i+j)//2]=="M" and s[j]=="G":
ans+=1
print(ans)
nohakai3