社区讨论

CSP-JT3骗分代码为什么不对啊,捏了好几个测试点都没问题啊

学术版参与者 2已保存回复 13

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
13 条
当前快照
1 份
快照标识符
@m2qvs8t8
此快照首次捕获于
2024/10/27 08:58
去年
此快照最后确认于
2025/11/04 23:43
4 个月前
查看原帖
CPP
#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;
}

回复

13 条回复,欢迎继续交流。

正在加载回复...