HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


140. 50655 - Divisibility by 9

Guest
• Discussion of problem (1)

Volume problems

• 115. 50425 - Calculating Weekly Pay
• 118. 50514 - Bookkeeping
• 120. 50426 - Calculating Sales
• 125. 50484 - Number Of Letters
• 130. 50440 - Call Center
• 132. 50504 - School contest
• 135. 50392 - How much space
• 136. 50443 - Dajte Express
• 140. 50655 - Divisibility by 9
• 145. 50656 - Divisibility by 11
• 147. 50553 - Divisible by m
• 148. 50596 - Your Ride Is Here (US...
• 148. 50596 - Your Ride Is Here (US...
• 150. 50763 - Valid Password
• 151. 50560 - Max Distance
• 153. 50368 - Right-most non zero d...
• 155. 50379 - a^b modulus k

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. Difficulty Beta

Divisibility by 9

Shqip

A number is divisible by 9, if sum of its digits is a multiple of 9.
Write a program that reads a number and finds out the remainder when the number is divided by 9.

Input specification
The first digit will be a non-zero digit. That digit is followed by other digits forming a number up to 250 digit long. There is a semicolon after the last digit showing the end of the number.

Output specification
Show the remainder from the division process.

Sample Input I     
5490;    

Sample Output I
0
Sample Input II
41085897;

Sample Output II
6

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

www.contester.ru