백준

[2292] 벌집

Jcoder 2018. 7. 14. 14:22


#include <iostream>
using namespace std;
int main(void)
{
long n, range=1;
int cnt = 1;
cin >> n;
while (1)
{
if (range >= n)
break;
range += (cnt++) * 6;
}
cout << cnt;
return 0;
}