- #include<bits/stdc++.h>
- using namespace std;
- int a[9];
- int s;
- int n=0;
- string str="0000000000ABCDEFGHJKLMNPQRSTUVXYWZIO";
- int main()
- {
- while(cin>>s)
- {
- for(int i=8; i>=0; i--)
- {
- a[i]=s%10;
- s/=10;
- }
- for(int i=0; i<8; i++)
- n+=a[i]*(8-i);
- for(int i=10; i<36; i++)
- {
- if(10-(((i%10)*9+(i/10)*1+n)%10)==a[8])
- cout<<str[i];
- else
- continue;
- }
- cout<<endl;
- n=0;
- }
- return 0;
- }
複製代碼 |