#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class stu
{
public:
int x;
int y;
float slope;
};
int main()
{
int s;
cin>>s;
int n=s+1;
stu* stud = new stu[n*n];
int k =0;
for(int i = 0;i < n;i++)
{
for(int j = 0;j < n;j++)
{
stud[k+j].x =((k+i)/n);
stud[k+j].y = j;
}
k=k+n;
}
vector<float>v;
for(int k=0;k<n*n;k++)
{
if(stud[k].x != 0)
{
stud[k].slope = (float)stud[k].y/stud[k].x;
v.push_back(stud[k].slope);
}
}
sort(v.begin(),v.end());
v.erase(unique(v.begin(), v.end()), v.end());
cout << v.size()+1 <<endl;
delete [] stud;
return 0;
}

posted on 2018-03-24 17:31  Mini_Coconut  阅读(313)  评论(0编辑  收藏  举报