当前位置:网站首页>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);
}
}
边栏推荐
- D26: the nearest number (translation + solution)
- Gorilla/mux framework (RK boot): add tracing Middleware
- D25:sequence search (sequence search, translation + problem solving)
- Investment demand and income forecast report of China's building ceramics industry, 2022-2028
- Open 2022 efficient office, starting from project management
- Introduction to the gtid mode of MySQL master-slave replication
- 2022 a special equipment related management (elevator) examination questions and a special equipment related management (elevator) examination contents
- Gossip about redis source code 83
- Vscode regular match replace console log(.*)
- The first game of the new year, many bug awards submitted
猜你喜欢
The first game of the new year, many bug awards submitted
[network security] what is emergency response? What indicators should you pay attention to in emergency response?
Loop compensation - explanation and calculation of first-order, second-order and op amp compensation
Entropy and full connection layer
Recursive least square adjustment
Design of logic level conversion in high speed circuit
Idea integrates Microsoft TFs plug-in
STM32 GPIO CSDN creative punch in
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?
How to understand the gain bandwidth product operational amplifier gain
随机推荐
A treasure open source software, cross platform terminal artifact tabby
2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) simulated examination and Guangdong Provincial Safety Officer a certificate third batch (main person in charg
Comment obtenir une commission préférentielle pour l'ouverture d'un compte en bourse? Est - ce que l'ouverture d'un compte en ligne est sécurisée?
Unity elementary case notes of angry birds Siki college 1-6
[source code] VB6 chat robot
Analysis on the scale of China's smart health industry and prediction report on the investment trend of the 14th five year plan 2022-2028 Edition
How to prevent malicious crawling of information by one-to-one live broadcast source server
What is the difference between NFT, SFT and dnft? How to build NFT platform applications?
Minimum commission for stock account opening. Stock account opening is free. Is online account opening safe
[leetcode] interview question 17.08 Circus tower
D23:multiple of 3 or 5 (multiple of 3 or 5, translation + solution)
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
[CSDN Q & A] experience and suggestions
Double efficiency. Six easy-to-use pychar plug-ins are recommended
P1629 postman delivering letter
Kubedl hostnetwork: accelerating the efficiency of distributed training communication
Introducing Software Testing
2022 t elevator repair registration examination and the latest analysis of T elevator repair
Gossip about redis source code 81
Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?