結果
| 問題 |
No.805 UMG
|
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2019-05-07 21:58:34 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 165 ms / 2,000 ms |
| コード長 | 255 bytes |
| コンパイル時間 | 143 ms |
| コンパイル使用メモリ | 82,212 KB |
| 実行使用メモリ | 65,712 KB |
| 最終ジャッジ日時 | 2024-11-18 13:47:31 |
| 合計ジャッジ時間 | 2,650 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
💕💖💞