有木有大佬帮忙看看哪里错了,输不出结果
查看原帖
有木有大佬帮忙看看哪里错了,输不出结果
1415079
whx_1026楼主2024/11/2 17:37

大佬帮忙看看那错了``` #include<bits/stdc++.h> using namespace std; long long s,n,m; int fu(int m){ int s=0; if(m%2==0){ s+=m; return s; }else{ int y=m; while(y%2!=0){ y*=7; int y=m%10+m/10; } s+=y; return s; } } int main(){ cin>>n; while(n--){ cin>>m; while(m>0){ int u=m%10; s+=fu(u); m/=10;

	}
	if(s%8==0){
		cout<<"T";
	}else{
		cout<<"F";
	}
}
return 0;

}

2024/11/2 17:37
加载中...