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

有人解释下我的程序为什么对吗?莫名其妙地过了...

Posted by zjx20 at 2008-06-17 23:06:54 on Problem 2719
char n[10]
gets(n)
r=0   //结果
len=strlen(n)
for(i=0;i<len;i++)
{
	p=n[i]-'0';
	if(p>4) p--;
	r += r*8+p;
}

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