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

Java CE 可是Ediplus通过了。。报错里面也是空的

Posted by alpc66 at 2010-10-08 06:32:16 on Problem 2663
import java.util.*;
import java.math.*;
import java.lang.*;
import java.io.*;

public class Main {
	static int Solve(int x){
		int i;
		if(x==0)
			return 1;
		int res = 3*Solve(x-2);
		for(i=x-4;i>=0;i-=2)
			res += 2*Solve(i);
		return res;
	}
	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		int N = cin.nextInt();
		while(N>=0){
			if(N%2==1)
				System.out.println("0");
			else
				System.out.println(Solve(N));
			N = cin.nextInt();
		}
	}
}

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