当前位置:网站首页>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);
}
}
边栏推荐
- How to make recv have a little temper?
- Les sociétés de valeurs mobilières dont la Commission d'ouverture d'un compte d'actions est la plus faible ont ce que tout le monde recommande.
- Similarities and differences of text similarity between Jaccard and cosine
- Introducing Software Testing
- Social network analysis -social network analysis
- [MySQL] sql99 syntax to realize multi table query
- Vscode regular match replace console log(.*)
- Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
- Gossip about redis source code 74
- Gossip about redis source code 81
猜你喜欢

The difference between single power amplifier and dual power amplifier
![Docking Alipay process [pay in person, QR code Payment]](/img/30/665580241020ee3adb872e725f0624.jpg)
Docking Alipay process [pay in person, QR code Payment]

How to prevent malicious crawling of information by one-to-one live broadcast source server

Idea set class header comments

Selenium check box

Unity elementary case notes of angry birds Siki college 1-6

How to quickly build high availability of service discovery

Smart fan system based on stm32f407

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

Current detection circuit - including op amp current scheme
随机推荐
2020.2.14
D26: the nearest number (translation + solution)
[MySQL] sql99 syntax to realize multi table query
How to prevent malicious crawling of information by one-to-one live broadcast source server
SPI based on firmware library
Apple released a supplementary update to MacOS Catalina 10.15.5, which mainly fixes security vulnerabilities
C # basic knowledge (1)
2022 chemical automation control instrument examination content and chemical automation control instrument simulation examination
[leetcode] interview question 17.08 Circus tower
Sword finger offer day 4 (Sword finger offer 03. duplicate numbers in the array, sword finger offer 53 - I. find the number I in the sorted array, and the missing numbers in sword finger offer 53 - ii
Selenium library 4.5.0 keyword explanation (4)
Kubedl hostnetwork: accelerating the efficiency of distributed training communication
Recursive least square adjustment
股票開戶傭金最低的券商有哪些大家推薦一下,手機上開戶安全嗎
AI Challenger 2018 text mining competition related solutions and code summary
Unity elementary case notes of angry birds Siki college 1-6
ESP Arduino playing with peripherals (V) basic concept of interrupt and timer interrupt
Gorilla/mux framework (RK boot): add tracing Middleware
Smart fan system based on stm32f407
Distributed transaction -- middleware of TCC -- selection / comparison