UVA 839 (13.08.20)】的更多相关文章

 Not so Mobile  Before being an ubiquous communications gadget, a mobile wasjust a structure made of strings and wires suspending colourfullthings. This kind of mobile is usually found hanging over cradlesof small babies. The figure illustrates a sim…
: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…
 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…
 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…
 Ananagrams  Most crossword puzzle fans are used to anagrams--groupsof words with the same letters in different orders--for exampleOPTS, SPOT, STOP, POTS and POST. Some words however do not have thisattribute, no matter how you rearrange their letter…
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: -…
 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…
点此连接到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…
 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…