Div 3 - SGU 105(找规律)

时间:2022-07-22 13:54:12

分析:很容易知道序列1,2,3, 4,5, 6......与3的关系就是1,2, 0,1, 2,0,......如果是在一个数后面添加一个数就变成了这种序列1, 0, 0, 1, 0, 0, 1, 0, 0.。。。

代码如下:

=======================================================================================

#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std; const int MAXN = ;
const int oo = 1e9+; int main()
{
int N; scanf("%d", &N); printf("%d\n", N/* + (N% == ?:)); return ;
}