求助P5710,为什么测试点1没错,却没过,只有20分
  • 板块学术版
  • 楼主con_WHBK
  • 当前回复4
  • 已保存回复4
  • 发布时间2022/7/6 19:38
  • 上次更新2023/10/27 21:41:54
查看原帖
求助P5710,为什么测试点1没错,却没过,只有20分
423362
con_WHBK楼主2022/7/6 19:38

MnZn

#include<bits/stdc++.h>
using namespace std;
int main(){
	int x,tot=0,a[4]={0};
	cin>>x;
	if(x%2==0)tot++;
	if(4<x&&x<=12)tot++;
	if(tot==0)a[4]=1;
	else if(tot==1)a[3]=1,a[2]=1;
	else if(tot==2)a[2]=1,a[1]=1;
	
	printf("%d %d %d %d",a[1],a[2],a[3],a[4]);
	
	return 0;
} 
2022/7/6 19:38
加载中...