結果
| 問題 | No.805 UMG |
| コンテスト | |
| ユーザー |
sinsincoscos
|
| 提出日時 | 2019-03-17 14:12:13 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 221 bytes |
| 記録 | |
| コンパイル時間 | 379 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 21,376 KB |
| 最終ジャッジ日時 | 2024-11-18 13:09:32 |
| 合計ジャッジ時間 | 17,834 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 TLE * 5 |
ソースコード
N = int(input())
S = input()
ans = 0
for i in range(N):
for j in range(N):
if i>=j or (i+j)%2==1:
continue
if S[i]=='U' and S[(i+j)//2]=='M' and S[j]=='G':
ans += 1
print(ans)
sinsincoscos