結果
| 問題 | No.805 UMG |
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2019-05-07 21:58:34 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 104 ms / 2,000 ms |
| + 386µs | |
| コード長 | 255 bytes |
| 記録 | |
| コンパイル時間 | 79 ms |
| コンパイル使用メモリ | 81,084 KB |
| 実行使用メモリ | 66,432 KB |
| 最終ジャッジ日時 | 2026-09-25 21:15:30 |
| 合計ジャッジ時間 | 2,672 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
N = int(input())
strs = list(input())
count = 0
for i in range(N):
for j in range(i+1, N):
k = 2*j - i
if k <= 0 or k >= N: continue
if strs[i] == 'U' and strs[j] == 'M' and strs[k] == 'G':
count += 1
print(count)
💕💖💞