13234 - GEC1506- Verify credit card (Medium)   

Description

In this problem, you need to process the numerical format of the credit card number to see whether the credit card is real or fake.

 

Assuming that there is a credit card number as 1234567891234563, the digits in the credit card number can show if the card is verified or not.

 

To make sure if the credit card number is verified, we need to follow the rules:

 

1. Make sure you got 15 or 16 digits in total, and list the digits from right to left, such as below:

 

 

2. For each digit, we multiply with 1 or 2. We multiply 1 for the odd digits, and multiply 2 for the even digits:

 

 

3.Sum all the multiplied result. 

 

 

4.As a verified credit card number, the sum of all the digits divided by 10 should be 0.

Input

The 1st line to the 4th line are the possible credit card numbers, such as:

1234567891234563

1234567891234573

1234567891234583

1234567891234593

**Note that: There will be 15 or 16 digits in one line.

Output

The result after the verification process, print out the "verified card numbers" if they are verified.

For the example input here, the output will be:

1234567891234563

 

Sample Input  Download

Sample Output  Download

Tags




Discuss