Create 1372.cpp

This commit is contained in:
Kirigaya Kazuto 2016-07-06 10:15:29 +08:00 committed by GitHub
parent 0713bc5744
commit 654dfd1c05

14
QUSTOJ/1372.cpp Normal file
View File

@ -0,0 +1,14 @@
#include <cstdio>
int main()
{
int n;
scanf("%d",&n);
int f=0;
int m=3;
for(int i=1;i<=n;i++)
{
f=(f+m)%i;
}
printf("%d\n",f+1);
return 0;
}