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

Re:小学的除法知识可以解决

Posted by lechateler at 2009-06-12 00:49:09 on Problem 2551
In Reply To:小学的除法知识可以解决 Posted by:peterdi at 2009-05-26 19:22:33
> 除法的步骤是能够除就得到余数+后一位继续除,题目中的意思被除数是无限长的,所以一直可以在低位添1。



嗯,用除法的方法就可以了,刚开始超时原来是判断输入结束有问题,应该用
while(scanf("%d",&num[i++]) != EOF)
我开始写的直接是while(scanf("%d",&num[i++]))就不对

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