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

没开数组0MS过,50题留念

Posted by aa2985759 at 2010-11-20 17:40:01 on Problem 3094
#include<iostream>
using namespace std;
int main()
{
	int sum,a,i;
	a=getchar();
	do
	{
		sum=0;
		i=1;
		do
		{
			if(a==32);
			else 
				sum+=(a-64)*i;
			a=getchar();
			i++;
		}while(a!='\n');
		printf("%d\n",sum);
		a=getchar();
	}while(a!='#');
}

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