UVa 10494 If We were a child Again: high precision

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.