Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

为啥老是wa啊?

Posted by cooooode at 2010-10-24 18:24:37 on Problem 1298
#include <iostream>
#include <string>
#include <cstdio>
using namespace std;

int main()
{
	string sbegin,send;
	char letter[300];
	int len;
	
	while(cin >> sbegin && sbegin != "ENDOFINPUT")
	{
		gets(letter);
		len = strlen(letter);
		for(int i=0; i<len; ++i)
		{
			if(letter[i] <= 90 && letter[i] >= 65)
			{
				letter[i] -= 5;
				if(letter[i] < 65)
			{
				letter[i] += 26; 
			}
			}
		}
		cin >> send;
		cout << letter << endl;
	}
	
	return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator