-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathURI1170Blobs.java
More file actions
33 lines (29 loc) · 860 Bytes
/
URI1170Blobs.java
File metadata and controls
33 lines (29 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
/**
* See
* <a href="https://www.urionlinejudge.com.br/judge/en/problems/view/1170">Blobs</a>
*
* @author Brian Yeicol Restrepo Tangarife
*/
public class URI1170Blobs {
static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter out = new PrintWriter(System.out);
public static void main(String[] args) throws IOException {
int N = Integer.parseInt(in.readLine());
double X;
int days;
while (N-- > 0) {
days = 0;
X = Double.parseDouble(in.readLine());
while (X > 1) {
X /= 2;
days++;
}
out.println(days + " dias");
}
out.close();
}
}