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 sheeper at 2013-01-27 13:57:16 on Problem 3195 and last updated at 2013-01-27 13:58:26
数据中每一组数据末尾紧跟着是换行,无多余空格(最后一组也是,也有一个换行)
我用的输入方法是:
do
{
	j=0;
	do
	{
		 if(scanf( "%d", &num[j] )!=EOF)j++;
		scanf( "%c", &c );
	}while( c != '\n' );
        //于是一组数据就存入num数组中了。
	if(j>0)
	{
          ……
        }//主程序

}while(j>0);

给组数据
2 -2
输出
:-( Try again.

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