UVA题解
UVA题解
zqhf123
这个作者很懒,什么都没留下…
展开
-
UVA11384正整数序列Help is needed for Dexter
Problem HHelp is needed for DexterTime Limit: 3 SecondDexter is tired of Dee Dee. So he decided to keep Dee Dee busy in a game. The game he planned for her is quite easy to play but not easy to win at least not for Dee Dee. But Dexter does not have time原创 2020-07-02 09:04:30 · 278 阅读 · 0 评论 -
UVa 202 - Repeating Decimals
The decimal expansion of the fraction 1/33 is 0.03, where the 03 is used to indicate that the cycle 03repeats indefinitely with no intervening digits. In fact, the decimal expansion of every rational number(fraction) has a repeating cycle as opposed to dec原创 2020-06-19 11:40:11 · 268 阅读 · 0 评论 -
uva1225 数数字 Digit Counting
Trung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequenceof consecutive integers starting with 1 to N (1 < N < 10000). After that, he counts the num...原创 2020-02-24 20:56:54 · 213 阅读 · 0 评论 -
UVA340 猜数字游戏的提示 Master-Mind Hints
你的任务是实现一个经典的“猜数字”游戏。给定答案序列和用户猜的序列,统计有多少数字位置正确(设为AA ),有多少数字在两个序列中都出现过但位置不对(BB )。输入包含多组数据。每组输入第一行为序列长度nn ,第二行是答案序列,接下来是若干行猜测序列。猜测序列全00 时表示该组数据结束。n=0n=0 时输入结束。对于每一组数据,输出的开头应有一行**“Game x:”(没有双引号,x为当前组数据...原创 2020-02-24 14:12:49 · 200 阅读 · 0 评论 -
uva401Palindromes(回文串和镜像串的判断)
输入一个字符串,判断它是否为回文串以及镜像串。输入字符串保证不含数字0。所谓回文串,就是反转以后与原串相同,如abba和madam。所谓镜像串,就是左右镜像之后和原串相同,如2S和3AIAE。注意,并不是每个字符在镜像之后都能得到一个合法字符。(空白项表示该字符镜像后不能得到一个合法字符。)Character Reverse Character Reverse Character Reverse...原创 2020-02-24 13:40:12 · 451 阅读 · 0 评论 -
UVA10082
题目:把手放在键盘上时,稍不注意就会往右错一位。 这样,输入Q会变成输入W,输入J会变成输入K等。 输入一个错位后敲出的字符串(所有字母均大写),输出打字员本来想打出的句子。 输入保证合法,即一定是错位之后的字符串。 例如输入中不会出现大写字母A。样例输入:O S, GOMR YPFSU/样例输出:I AM FINE TODAY.#include<cstdio>#inc...原创 2020-02-23 11:56:23 · 316 阅读 · 0 评论 -
UVA1583 - Digit Generator(生成元)
For a positive integer N, the digit-sum of N is defined as the sum of N itself and its digits. When Mis the digitsum of N, we call N a generator of M.For example, the digit-sum of 245 is 256 (= 245 ...原创 2020-02-23 11:13:20 · 254 阅读 · 0 评论