| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
PASCAL 1AC 4WA 一定要用长整型啊亲!!!var s:string;
i,l,sum:longint;
begin
readln(s);
while s<>'#' do begin
l:=length(s);
sum:=0;
for i:=1 to l do
if s[i]<>' ' then
sum:=sum+(ord(s[i])-64)*i;
writeln(sum);
readln(s);
end;
end.
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator