728x90
(L + 1) / 5 + 1 을 출력하면 됩니다.
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int n;
cin >> n;
cout << (n - 1) / 5 + 1 << endl;
return 0;
}
'알고리즘' 카테고리의 다른 글
[C++] 백준 16076번 휴식이 필요해 (0) | 2019.11.13 |
---|---|
[C++] 백준 15439번 Vera and Outfits (0) | 2019.11.13 |
[C++] 백준 17295번 엔드게임 스포일러 (0) | 2019.11.13 |
[C++] 백준 15964번 이상한 기호 (0) | 2019.11.13 |
[C++] 백준 5522번 카드 게임 (0) | 2019.11.13 |