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

直接把f(0),f(1),f(2)看做整体,代入法超简单~~

Posted by loveKid at 2009-02-08 20:07:30 on Problem 2583
import java.util.Scanner;
class Main {
	public static void main(String[] args) {
	Scanner cin=new Scanner(System.in);
while(cin.hasNext()){
int f0=cin.nextInt();
int f1=cin.nextInt();
int f2=cin.nextInt();
int f3=f0-3*f1+3*f2;
int f4=3*f0-8*f1+6*f2;
int f5=6*f0-15*f1+10*f2;
System.out.println(f3+" "+f4+" "+f5);
}	
}}

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