1050: 贝贝的ISBN号码(isbn)

#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <string>
using namespace std;
int main(){
string s;
cin>>s;
//0-970-82162-4
int m = ((int)s[] -) * ; m += ((int)s[] - ) * ;
m += ((int)s[] -) * ;
m += ((int)s[] -) * ; m += ((int)s[] -) * ;
m += ((int)s[] -) * ;
m += ((int)s[] -) * ;
m += ((int)s[] -) * ;
m += ((int)s[] -) * ; int n = m % ;
int t = (int)s[] -;
if(s[] == 'X')
t = ;
if(n == t)
cout<<"Right";
else
{
if(n != )
s[] = n + ;
else
s[] = 'X';
cout<<s;
} // cout<<setiosflags(ios::fixed)<<setprecision(4)<<s<<endl;
// cout<< setiosflags(ios::fixed)<<setprecision(4) <<c<<endl;
}
上一篇:1049: 贝贝的车牌问题(car)


下一篇:bnu 4351 美女来找茬(水水)