結果
問題 |
No.805 UMG
|
ユーザー |
![]() |
提出日時 | 2019-04-26 14:03:38 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 193 bytes |
コンパイル時間 | 55 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-18 13:44:48 |
合計ジャッジ時間 | 1,193 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | AC * 2 RE * 23 |
ソースコード
N = int(raw_input()) S = raw_input() cnt = 0 for i in range(1, N+1): for j in range(i+1, N+1): k = 2*j-i if j < k: if S[i] == 'U' and S[j] == 'M' and S[k] == 'G': cnt += 1 print cnt