当前位置:网站首页>ISBN number
ISBN number
2022-07-03 23:56:00 【< WRM>】
#include<bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int a[10];
int pos = 0;
for (int i = 0; i < str.size(); i++) {
if (isdigit(str[i])) {
a[pos++] = str[i] - 48;
}
}
int sum = 0;
for (int i = 0; i < 9; i++) {
sum = sum + a[i] * (i + 1);
}
char x;
if (sum % 11 == 10) {
x = 'X';
} else {
x = sum % 11 + 48;
}
if (x == str[str.size() - 1]) {
printf("Right\n");
} else {
for (int i = 0; i < str.size() - 1; i++) {
cout << str[i];
}
printf("%c\n", x);
}
}
边栏推荐
- "Learning notes" recursive & recursive
- P1656 bombing Railway
- 炒股開戶傭金優惠怎麼才能獲得,網上開戶安全嗎
- The interviewer's biggest lie to deceive you, bypassing three years of less struggle
- NLP Chinese corpus project: large scale Chinese natural language processing corpus
- D28:maximum sum (maximum sum, translation)
- The upload experience version of uniapp wechat applet enters the blank page for the first time, and the page data can be seen only after it is refreshed again
- It is forbidden to splice SQL in code
- Cgb2201 preparatory class evening self-study and lecture content
- NLP pre training technology development
猜你喜欢

2022 chemical automation control instrument examination content and chemical automation control instrument simulation examination

Research Report on the scale prediction of China's municipal engineering industry and the prospect of the 14th five year plan 2022-2028

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

2022 t elevator repair registration examination and the latest analysis of T elevator repair

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

How to make icons easily

Fluent learning (5) GridView
![[CSDN Q & A] experience and suggestions](/img/db/dff3173dda24ca5740729b54a81153.jpg)
[CSDN Q & A] experience and suggestions

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

What is the Valentine's Day gift given by the operator to the product?
随机推荐
股票开户佣金最低的券商有哪些大家推荐一下,手机上开户安全吗
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
Distributed transaction -- middleware of TCC -- selection / comparison
Selenium check box
Deep learning ----- using NN, CNN, RNN neural network to realize MNIST data set processing
Entropy and full connection layer
[note] IPC traditional interprocess communication and binder interprocess communication principle
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
2022.02.13
Version rollback revert don't reset better reset must be forced
[CSDN Q & A] experience and suggestions
[MySQL] classification of multi table queries
Gossip about redis source code 78
Kubedl hostnetwork: accelerating the efficiency of distributed training communication
Iclr2022: how does AI recognize "things I haven't seen"?
Gossip about redis source code 83
Is user authentication really simple
Fluent learning (5) GridView
Introducing Software Testing
Alibaba cloud container service differentiation SLO hybrid technology practice