蒟蒻弱弱,求调试
查看原帖
蒟蒻弱弱,求调试
1042374
leixiuzi楼主2024/6/29 17:15
#include<bits/stdc++.h>
using namespace std;
int main(){
	string s;
	int len,tep=0,sun=0,mod=11;
	cin>>s;
	for(int i=0;i<11;i++){
		if(s[i]!='-'){
			int num=s[i]-'0';
			sun+=num*++tep;
			sun%=mod;		
		}
	}
	int than=s[12]-'0';
	s[12]=sun+'0';
	if(sun==than) cout<<"Right";
	else cout<<s;
	return 0;
} 
2024/6/29 17:15
加载中...