UVA 10494 (13.08.02)】的更多相关文章

点此连接到UVA10494 思路: 采取一种, 边取余边取整的方法, 让这题变的简单许多~ AC代码: #include<stdio.h> #include<string.h> int main() { long long mod; long long k, tmp; int len; int ans[10010]; char num[10010], ch[2]; while(scanf("%s%s%lld", num, ch, &mod) != EOF…
 Overflow  Write a program that reads an expression consisting of twonon-negative integer and an operator. Determine if either integer orthe result of the expression is too large to be represented as a``normal'' signed integer (typeinteger if you are…
 Integer Inquiry  One of the first users of BIT's new supercomputer was Chip Diller. Heextended his explorationof powers of 3 to go from 0 to 333 and he explored taking various sumsof those numbers. ``This supercomputer is great,'' remarked Chip. ``I…
 Product  The Problem The problem is to multiply two integers X, Y. (0<=X,Y<10250) The Input The input will consist of a set of pairs of lines. Each line in pair contains one multiplyer. The Output For each input pair of lines the output line should…
:W Problem A: Football (aka Soccer)  The Problem Football the most popular sport in the world (americans insist to call it "Soccer",but we will call it "Football"). As everyone knows, Brasil is the country that have mostWorld Cup title…
 Cube painting  We have a machine for painting cubes. It is supplied withthree different colors: blue,red and green. Each face of the cube gets oneof these colors. The cube's faces arenumbered as in Figure 1. Figure 1. Since a cube has 6 faces, our m…
 The Snail  A snail is at the bottom of a 6-foot well and wants to climb to the top.The snail can climb 3 feetwhile the sun is up, but slides down 1 foot at night while sleeping.The snail has a fatigue factorof 10%, which means that on each successiv…
Problem H The Land of Justice Input: standard input Output: standard output Time Limit: 4 seconds In the Land of Justice theselling price of everything is fixed all over the country. Nobody can buy a thingand sell it in double price. But, that create…
 The ? 1 ? 2 ? ... ? n = k problem  Theproblem Given the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k ? 1 ? 2 ? ... ? n = k For example: to obtain k = 12 , the expression to be used will be: -…
 Tree Recovery  Little Valentine liked playing with binary trees very much. Her favoritegame was constructingrandomly looking binary trees with capital letters in the nodes. This is an example of one of her creations: D / \ / \ B E / \ \ / \ \ A C G…