結果
問題 |
No.805 UMG
|
ユーザー |
|
提出日時 | 2020-09-08 07:45:42 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 228 bytes |
コンパイル時間 | 95 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-18 14:06:59 |
合計ジャッジ時間 | 12,008 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 TLE * 1 |
ソースコード
n = int(input()) s = input() ans = 0 for i in range(n): for j in range(i + 1, n): if j + (j - i) >= n: break if s[i] == "U" and s[j] == "M" and s[j + j - i] == "G": ans += 1 print(ans)