結果
問題 | No.805 UMG |
ユーザー | RK Python |
提出日時 | 2020-06-08 18:55:13 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 142 ms / 2,000 ms |
コード長 | 210 bytes |
コンパイル時間 | 198 ms |
コンパイル使用メモリ | 82,108 KB |
実行使用メモリ | 65,008 KB |
最終ジャッジ日時 | 2024-11-18 14:02:24 |
合計ジャッジ時間 | 2,768 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
N = int(input())S = input()c = 0for i in range(N):for j in range(i+1,N):k = 2*j - iif k < N:if S[i] == "U" and S[j] == "M" and S[k] == "G":c += 1print(c)