report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Calculator - MarisaOJ: Marisa Online Judge

Calculator

Time limit: 1000 ms
Memory limit: 256 MB
Design a calculator capable of performing four operations: - Addition `+`. - Subtraction `-`. - Multiplication `*`. - Division `/`. with two real numbers $a, b$. ### Input - One line containing a real number $a$, a character representing the operation, and finally another real number $b$. ### Output - Print the result of the operation. Round the result to the third decimal place. If the calculation is invalid, print `ze`. ### Constraints - $-1000 \le a, b \le 1000$. ### Sample Input: ``` 4 * 5 ``` Output: ``` 20.000 ```
Input / Output and Condition
Hello Marisa!
A + B
A / B
Complex multiplication
Mushroom Classification
Integer equation
Age
Combine rectangles
String
Triangle
Rounded division
Circle
Calculator
The smallest and biggest
Rectangle
Segment
Distance
Ascending
Square number
Square numbers counting
Uppercase and lowercase
Letter Counting
Time format
Electricity bill
Eating mushroom
Topic
Basic
Rating 800
Solution (1) Solution