笑死我啦
查看原帖
笑死我啦
1572549
Wuchenxi0416楼主2025/1/28 10:12
#include<iostream>
using namespace std;
int main(){
    char x;
    int x2 = -1;
    long long sum;
    int a,b,c;
    char e,f,g;
    cin >> a >> e >> b >> f >> c >> g >> x;
    sum = a * 1e9 + b * 1e7 + c;
    if(x == 'x'){
        x2 = 10;
    }
    if(sum % 11 == x2){
        x = 'x';
    }else{
        x = sum % 11 + 48;
    }
    if(sum % 11 == x){
        cout << "Right";
    }else{
        cout << a << '-' << b << '-' << c << '-' <<x;
    }
    return 0;
}

测试只过了两个,却100。

2025/1/28 10:12
加载中...