CSP-JT3骗分代码为什么不对啊,捏了好几个测试点都没问题啊
  • 板块学术版
  • 楼主Cu_lly888_6_5_A6
  • 当前回复13
  • 已保存回复13
  • 发布时间2024/10/27 08:56
  • 上次更新2024/10/27 10:00:50
查看原帖
CSP-JT3骗分代码为什么不对啊,捏了好几个测试点都没问题啊
1177758
Cu_lly888_6_5_A6楼主2024/10/27 08:56
#include<bits/stdc++.h>
using namespace std;
int main() {
	int a,b[100005],h,hh;
	cin>>a;
	for(int i=1 ; i<=a ; i++){
		cin>>b[i];
		h=(b[i]-1)/7;
		if(b[i]%7==1){
			cout<<10;
			b[i]=b[i]+1;
			for(int i=1 ; i<=h-1 ; i++){
				cout<<8;
			}
		}
		else{
			hh=b[i]/7;
			for(int i=1 ; i<=hh ; i++){
				cout<<8;
			}
		}
	}
    return 0;
}

2024/10/27 08:56
加载中...