题目链接:https://vjudge.net/contest/279625#problem
代码:
#include <iostream>
using namespace std;
int main()
{
int x,sum=0;
cin >> x;
if (x < 1 || x>1000000)
return 0;
while (x > 5)
{
sum++;
x = x - 5;
}
cout << sum + 1;
}
题目链接:https://vjudge.net/contest/279625#problem
代码:
#include <iostream>
using namespace std;
int main()
{
int x,sum=0;
cin >> x;
if (x < 1 || x>1000000)
return 0;
while (x > 5)
{
sum++;
x = x - 5;
}
cout << sum + 1;
}