The problem is as follows:
Input a serial number (a string consisting only of digits and uppercase letters). First, determine whether the input of the serial number is correct. If it does not meet the requirements (a string consisting only of digits and uppercase letters), return to re-enter. If it meets the requirements, start to calculate the registration code. Take the character that is the previous 1 bit of the ASCII code of the first character (for example, A is @, 9 is 8), take the character that is the previous 2 bits of the ASCII code of the second character (for example, A is?, 9 is 7), take the character that is the previous 4 bits of the ASCII code of the third character (for example, A is =, 9 is 5), take the character that is the previous 5 bits of the ASCII code of the fourth character (for example, A is <, 9 is 4), take the character that is the previous 1 bit of the ASCII code of the fourth from the last character, take the character that is the previous 2 bits of the ASCII code of the third from the last character, take the character that is the previous 4 bits of the ASCII code of the second from the last character, take the character that is the previous 5 bits of the ASCII code of the last character, (the middle several characters do not participate in the calculation), and form an 8 (or 6, 4, 2)-bit character registration code. For example, the serial number: W1D0W7M5A0J593459609490, the registration number: V/@+825+
It is easier to do with Excel. With p processing, I don't know how to do it! I want to use the following text file for query, first check the ASCII code by character, then do the subtraction calculation, and then query the character with the calculation result. Unfortunately, I always can't write it well. Maybe the solution with debug is simpler. Please ask for the optimal solution, thank you.
+ 43
, 44
- 45
. 46
/ 47
0 48
1 49
2 50
3 51
4 52
5 53
6 54
7 55
8 56
9 57
: 58
; 59
< 60
= 61
> 62
? 63
@ 64
A 65
B 66
C 67
D 68
E 69
F 70
G 71
H 72
I 73
J 74
K 75
L 76
M 77
N 78
O 79
P 80
Q 81
R 82
S 83
T 84
U 85
V 86
W 87
X 88
Y 89
Z 90
Input a serial number (a string consisting only of digits and uppercase letters). First, determine whether the input of the serial number is correct. If it does not meet the requirements (a string consisting only of digits and uppercase letters), return to re-enter. If it meets the requirements, start to calculate the registration code. Take the character that is the previous 1 bit of the ASCII code of the first character (for example, A is @, 9 is 8), take the character that is the previous 2 bits of the ASCII code of the second character (for example, A is?, 9 is 7), take the character that is the previous 4 bits of the ASCII code of the third character (for example, A is =, 9 is 5), take the character that is the previous 5 bits of the ASCII code of the fourth character (for example, A is <, 9 is 4), take the character that is the previous 1 bit of the ASCII code of the fourth from the last character, take the character that is the previous 2 bits of the ASCII code of the third from the last character, take the character that is the previous 4 bits of the ASCII code of the second from the last character, take the character that is the previous 5 bits of the ASCII code of the last character, (the middle several characters do not participate in the calculation), and form an 8 (or 6, 4, 2)-bit character registration code. For example, the serial number: W1D0W7M5A0J593459609490, the registration number: V/@+825+
It is easier to do with Excel. With p processing, I don't know how to do it! I want to use the following text file for query, first check the ASCII code by character, then do the subtraction calculation, and then query the character with the calculation result. Unfortunately, I always can't write it well. Maybe the solution with debug is simpler. Please ask for the optimal solution, thank you.
+ 43
, 44
- 45
. 46
/ 47
0 48
1 49
2 50
3 51
4 52
5 53
6 54
7 55
8 56
9 57
: 58
; 59
< 60
= 61
> 62
? 63
@ 64
A 65
B 66
C 67
D 68
E 69
F 70
G 71
H 72
I 73
J 74
K 75
L 76
M 77
N 78
O 79
P 80
Q 81
R 82
S 83
T 84
U 85
V 86
W 87
X 88
Y 89
Z 90
