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 lgl0927 at 2010-12-13 21:02:47 on Problem 1287 and last updated at 2010-12-13 21:07:25
本题pe,wa,re了n次,最后发现全是输入惹得祸。题目要求当输入的p=0是结束程序,本菜鸟发现如下格式能通过:
scanf("%d",&p);
while(q)
{
 ······
 ······
 ······
 scanf("%d",&p);
}
或
while(1)
{
 scanf("%d",&p);
 if(!p)
    break;
 scanf("%d",&r);
 ······
 ······
}
总之p和r不能用一条语句同时输入···

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