10494-if We were a child Again
Time limit:3.000 seconds
Http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=97&page=show_problem &problem=1435
"Oooooooooooooooh! If I could do the easy mathematics like my school days!! I can guarantee, that I ' d ' l ' mistake, no, this time!! ' Says a smart University student!! But his teacher even smarter– "ok! I ' d assign you such projects in your software lab. Don ' is so sad. ' "really!!"-the students feels happy. And he feels so happy, he cannot, the smile in his teacher's face. |
|
The Problem The "the" the poor student is to make a calculator this can just perform the basic arithmetic operations. But like many the other university students he doesn ' t-like-does any project by himself. He just wants to collect programs from and there. As you are a friend of him, he asks you to write the program. But, you are also intelligent enough to tackle this kind of people. You are agreed to write only the (integer) Division and mod (% in C + +) operations for him. |
Input The Input is a sequence of lines. Each line would contain an input number. One or more spaces. A sign (division or MoD). Again spaces. and another input number. Both the input numbers are non-negative integer. The one may is arbitrarily long. The second number n would be in the range (0 < n < 231). |
Output A for each input, the each containing an integer. The sample input and output. Output should not contain any extra spaces. |
Sample Input 110/100 99% 10 2147483647/2147483647 2147483646% 2147483647 |
|
Sample Output 1 9 1 2147483646 |