VioletaBabel

2292번: 벌집 본문

백준/백준-C++
2292번: 벌집
Beabletoet 2017. 1. 27. 11:00

#include <iostream>

using namespace std;

int main()

{

int N, count=1, six=6;

cin >> N;

for (int i = 1; i < N; six += 6)

{

++count;

i += six;

}

cout << count;

}

'백준 > 백준-C++' 카테고리의 다른 글

1011번: Fly me to the alpha centauri  (0) 2017.01.27
1193번: 분수찾기  (0) 2017.01.27
2438번: 별찍기 - 1  (0) 2017.01.27
10809번: 알파벳 찾기  (0) 2017.01.27
2675번: 문자열 반복 (실패)  (0) 2017.01.27
Comments