F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Dual horsetail

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1    Accepted Submission(s): 1


Problem Description
  Nanaya's favorite Dual horsetail robot has run out of power!
  As a best friend of Nanaya, Cdfpysw decide to do something for him.
  Cdfpysw, the king of alpaca, has some very powerful energy balls numbered by 1,2,3……n. He let Nanaya divide them into some sets to save the robot.
  However, if there are three balls whose numbers are labeled X,Y and X&Y in the same set, they will explode! Nanaya must divide these balls into some sets and avoid explosion.
  Nanaya is a shy man, he don't want to divide these balls into too many sets. Please tell him the minimum number of sets.
 

Input
  The first line contains an integer T, indicating the number of cases.
  The next T line, each line contains an integer n indicating the number of balls. (1 <= n <= 109)
 

Output
  For each test case in the input, print one line: "Case #X: Y", where X is the test case number (starting with 1) and Y represents the minimum number of sets.
 

Sample Input
2 2 3
 

Sample Output
Case #1: 1 Case #2: 2
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-03-29 22:19:49, Gzip enabled