Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
great work actually
Voted "best practices" because it only does as much calculation as necessary, unlike the most popular solution. Well done.
This comment is hidden because it contains spoiler information about the solution
the value of 'x' is 10,it is only one number.and
ai
which means the number character value at the i-th position. For example, a1 is the 18th verification code of the ID number(if a1 was 'x',the value of it will be 10);The "Incorrect id number format" part of the description is not exhaustive.
The description doesn't explain what to do about x.
It is not clear what a1 equals to when the last character is x.
The description probably lacks a formula to calculate x.
It is impossible to calculate summation of [ a18 * W18, a17 * W17, . . . , a1 * W1 ] without knowing a1.