"Informatics Stars" Online Contests - 2011-2014 |
Start: Oct.20.2012 at 10:00:00 AM
Finish: Oct.20.2012 at 03:00:00 PM
The contest is finished!
• Contest scoreboard
|
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
|
Для отправки решений необходимо выполнить вход.
|