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:为什么RE?

Posted by SE06llm at 2007-07-06 22:35:23 on Problem 2984
In Reply To:为什么RE? Posted by:SE06llm at 2007-07-06 21:57:49
.........乱了
> import java.util.Scanner;
> 
> public class Main {
> 	public static void main(String[] args) {
> 		try {
> 			Scanner cin = new Scanner(System.in);
> 			long input=cin.nextLong();
> 			long n = 0;
> 			String str=Long.toBinaryString(input);
> 			n=str.lastIndexOf('1');
> 			long a=1;
> 			a<<=(n-1);
> 			a++;
> 			System.out.print(a);
> 		} catch (Exception e) {
> 			e.printStackTrace();
> 		}
> 	}
> }

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