-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNo_2292.java
More file actions
33 lines (27 loc) · 757 Bytes
/
No_2292.java
File metadata and controls
33 lines (27 loc) · 757 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
/*
Problem_2292_벌집
https://www.acmicpc.net/problem/2292
*/
import java.io.*;
public class No_2292 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
final int SIX = 6;
int number = Integer.parseInt(br.readLine());
int range = 1;
int count = 1;
int tempo = 1;
while(true) {
if (range >= number) {
break;
}
range += (SIX * tempo++);
count++;
}
bw.write(count + "");
bw.flush();
bw.close();
br.close();
}
}