mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
15 lines
185 B
C++
15 lines
185 B
C++
#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;
|
|
}
|