UVa 10494

From Algorithmist
Jump to navigation Jump to search

10494 - If We Were a Child Again[edit]

http://uva.onlinejudge.org/external/104/10494.html

Summary[edit]

Divide a BigNum for a long integer, and print the (/) or the (%), according to the input signal.

Gotcha[edit]

  • The input can have more than one space between the numbers and the signal.

Input[edit]

110 / 100
99 % 10
2147483647 / 2147483647
2147483646 % 2147483647
13245678912345678913456789          /          123116
13245678912345678913456789          %          123116
0 / 10
0 % 10
123456789123456121654987654321654987654321354987654321654987456789123456789456123456789 / 3333333333

Output[edit]

1
9
1
2147483646
107586982295929683497
40137
0
0
37037036740740540170570350313553531327651759629061472459402384282677275465104