HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Strings > problem:


50656 - Divisibility by 11

Guest
• Review clarifications (2)

Section problems

• 50503 - Welcome Andi - 2
• 50926 - School Mail Merge
• 50764 - Fast Typing Competition
• 50533 - Contacts List
• 50555 - Frequency of Letters
• 50596 - Your Ride Is Here (USACO)
• 50596 - Your Ride Is Here (USACO)
• 50655 - Divisibility by 9
• 50656 - Divisibility by 11
• 50767 - Censor
• 50768 - Where is Waldorf?
• 50769 - Arithmetic expression
• 50762 - Rare name

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

Divisibility by 11

Shqip

A number is divisible by 11, if the difference between sum of odds digits and sum of even digits is 0 or a multiple of 11.
For example:
     34871903 (The number)
     3+8+1+0=12 (sum of odd digits)
     4+7+9+3=23 (sum of even digits)
     23-12=11 (the difference)
  The number is divisible by 11.
  Write a program that reads a number up to 1000 digits and finds out if the number is divisible by 11 or not.

Input specification
The first digit is non zero digit and the number has upto 1000 digits in one line ending with a semicolon (;)

Output specification
Say "YES" if the number is divisible by 11, "NO" otherwise.

Sample Input I     
5940;    

Sample Output I
YES
Sample Input II
10000000000000000000001;

Sample Output II
NO

Для отправки решений необходимо выполнить вход.

www.contester.ru