Contest Duration: ~ (local time) (120 minutes) Back to Home

Submission #345163

Source Code Expand

Copy
```import java.util.*;
import java.math.*;
import java.io.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

public class Main{

// ArrayList<Integer> lis = new ArrayList<Integer>();
// ArrayList<String> lis = new ArrayList<String>();
// PriorityQueue<P> que = new PriorityQueue<P>();
// PriorityQueue<Integer> que = new PriorityQueue<Integer>();
//  Stack<Integer> que = new Stack<Integer>();
//HashMap<Long,Long> map = new HashMap<Long,Long>();
//	static long sum=0;
// 1000000007 (10^9+7)
static int mod = 1000000007;
//static int mod = 1000000009; ArrayList<Integer> l[]= new ArrayList[n];
//   static int dx[]={1,-1,0,0};
//static int dy[]={0,0,1,-1};
//	static int dx[]={1,-1,0,0,1,1,-1,-1};
//  static int dy[]={0,0,1,-1,1,-1,1,-1};

//static Set<Integer> set = new HashSet<Integer>();
//static ArrayList<Integer> l[];
//static int parent[][],depth[],node,max_log;
//   static ArrayList<Integer> nd[]= new ArrayList[2001];

public  static void main(String[] args)   throws Exception, IOException{

//Scanner sc =new Scanner(System.in);

//int n=sc.nextInt();//,m=sc.nextInt(),k=sc.nextInt();
//int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();

int n=sc.nextInt();//,k=sc.nextInt(),s=0;
HashSet<Integer> set = new HashSet<Integer>();

for (int i = 0; i < n; i++) {
int x=sc.nextInt();
while(x%2==0)x/=2;
}
System.out.println(set.size());
}

/*
static class P implements Comparable<P>{
int id, d; ;
P(int id,int d){
this.id=id;
this.d=d;
}

public int compareTo(P x){
//	return  (-x.d+d)>=0?1:-1  ; // ascend long
//	return   -x.d+d  ; // ascend
return   x.d-d  ; //descend
}

}//*/

static void db(Object... os){
System.err.println(Arrays.deepToString(os));

}

static boolean validpos(int x,int y,int r, int c){

return x<r && 0<=x && y<c && 0<=y;

}

static boolean bit(int x,int k){
// weather k-th bit (from right) be one or zero
return  ( 0 < ( (x>>k) & 1 )  )  ? true:false;
}

}

{
private StringTokenizer st;

{
st = null;
}
public String nextString() throws IOException
{
while( st==null || !st.hasMoreTokens() )
return st.nextToken();
}
public int nextInt() throws IOException
{
return Integer.parseInt(nextString());
}
public long nextLong() throws IOException
{
return Long.parseLong(nextString());
}
public double nextDouble() throws IOException
{
return Double.parseDouble(nextString());
}
}```

#### Submission Info

Submission Time 2015-02-28 21:06:34+0900 C - 高橋くんと魔法の箱 mukku Java (OpenJDK 1.7.0) 100 2823 Byte AC 1022 ms 38140 KB

#### Judge Result

Set Name Score / Max Score Test Cases
Case Name Status Exec Time Memory