Number of arithmetic operations#8984

Number of arithmetic operations

1 saniye
64 megabayt
Çok kolay

You are given a string that represents a valid arithmetic expression, which includes numbers, parentheses, and various arithmetic operators similar to those used in Python: + (addition), - (subtraction), * (multiplication), ** (exponentiation), / (division), // (floor division), and % (modulus). Your task is to determine the total number of arithmetic operations present in the expression.

Giriş

A string representing an arithmetic expression that includes numbers, parentheses, and arithmetic operators.

Çıktı

An integer representing the count of arithmetic operations in the expression.

Örnekler

Örnek 1

Loading
Loading