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:我是指在pku服务器上。

Posted by fengyang at 2008-10-25 15:18:40
In Reply To:system("ls -l > ls.txt") 这样?? Posted by:Sempr at 2008-10-25 14:58:05
比如1000题
#include <stdio.h>
#include <stdlib.h>
int main()
{
	char s[99]="expr 5 + 6";
	int a,b;
	scanf("%d%d",&a,&b);
	if(a==10||b==10)printf("%d\n",a+b);
	else
	{
		s[5]=a+'0';
		s[9]=b+'0';
		system(s);            <-怎么把这句的结果重定向到输出文件里。
	}
	return 0;
}

在本地shell里测试看上去结果是对的。交上去是wa。

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