【题意】:很普通的解码问题,所有的大写字母左移5位。注意A-E的移动是加21,其他的减5。
【代码:AC】
#include
#include
#include
#include
#include
using namespace std;
#define MAX 200+10
int main()
{
char str[MAX];
while (gets(str))...
分类:
其他好文 时间:
2015-01-30 00:05:37
阅读次数:
184
Problem Description
A snail is at the bottom of a 6-foot well and wants to climb to the top. The snail can climb 3 feet while the sun is up, but slides down 1 foot at night while sleeping. The snai...
分类:
其他好文 时间:
2015-01-28 14:51:13
阅读次数:
126
http://acm.hdu.edu.cn/showproblem.php?pid=2091
scanf 和 printf的输入输出功能并不强大。有时候我们需要清空输入输出流,所以一定切记getchar()的使用。
#include
int main()
{
char a;
int i,j,k=0,n;
scanf("%c",&a);
while (a!='@')
{
s...
分类:
其他好文 时间:
2015-01-27 16:23:18
阅读次数:
147
Problem Description
The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and...
分类:
其他好文 时间:
2015-01-26 22:56:41
阅读次数:
202
Problem Description
Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N!
Input
One N in one line, process to the end of file.
Output
For each N, output N! in one line.
...
分类:
其他好文 时间:
2015-01-26 22:54:23
阅读次数:
236
Problem Description
A snail is at the bottom of a 6-foot well and wants to climb to the top. The snail can climb 3 feet while the sun is up, but slides down 1 foot at night while sleeping. The snai...
分类:
其他好文 时间:
2015-01-26 13:41:20
阅读次数:
185
RPG的错排
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 7874 Accepted Submission(s): 3217
Problem Description
今年暑假杭电ACM集训队第一次组成女生...
分类:
其他好文 时间:
2015-01-18 19:44:30
阅读次数:
279
废话不说,先上题:Text ReverseTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17744Accepted Submission(s): ...
分类:
其他好文 时间:
2014-12-11 22:15:15
阅读次数:
277
/*杭电ACM ID:2007*/#define _CRT_SECURE_NO_WARNINGS#include int main(){ int in1, in2, out1, out2; int temp = 0, min, max; while (scanf("%d %d", &in1, &in...
分类:
其他好文 时间:
2014-12-07 17:35:18
阅读次数:
113
由于在货币组合的题目中使用了母函数的方法,就顺便搜索一些资料和练习,加深自己的理解。杭电ACM课件中简要介绍了母函数的方法,并给出了几道相关的题目。1. HDU1398 Square Coins使用指定的货币来组合一个给定的目标值,问一共有多少种可能。这道题和我们以前的货币组合题目大同小异,代码如下...
分类:
其他好文 时间:
2014-11-13 00:26:36
阅读次数:
358