A1000
...........................................
#include<stdio.h>
int main() {
int a, b;
while(scanf("%d%d", &a, &b) != EOF)
printf("%d", a+b);
return 0;
}
...........................................
A1001
...........................................
#include<stdio.h>
void fun(int t) {
if(t == 0) {printf("000000\n");return;}
int a[6]={0};
int d = 6;
while(t) {
a[--d] = t&1;
t >>= 1;
}
for(int i = 0; i < 6; i++)
printf("%d", a[i]);
printf("\n");
}
int main() {
int t = 0;
while(t<64) {
fun(t);
t++;
}
return 0;
}
...........................................
A1002
...........................................
#include<stdio.h>
void fun(int t) {
//if(t == 0) {printf("000000\n");return;}
int a[6]={0};
int d = 6;
while(t) {
a[--d] = t&1;
t >>= 1;
}
int cnt = 0;
for(int i = 0; i < 6; i++)
if(a[i] == 1) cnt++;
if(cnt % 2 == 1) {
for(int i = 0; i < 6; i++)
printf("%d", a[i]);
printf("\n");
}
}
int main() {
int t = 0;
while(t<64) {
fun(t);
t+
TsinsenA1000,A1001,A1002,A1003,A1004,A1005,A1006,A1007,A1008,A1009,A1010水题记录
最新推荐文章于 2021-04-15 13:08:02 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)