Accenture Coding Question | Remainder mod 11 | CodeWindow

Remainder mod 11

Given a string (of maximum length 1000) representing a large number. Output is modulo of 11.

Input specification:
Input 1: A large number in the form of a string.

Output Specification:
Return the remainder modulo 11 of input 1.

Example 1:
Input 1: 121

Output: 0
Explanation:
121 mod 11 = 0

Example 2:
Input 1: 13

Output: 2
Explanation:
13 mod 11 = 2

Solution in Python 3:

#https://codewindow.in
#join our telegram channel

x=int(input())
print(x%11)

# Telegram @codewindow

Output:

13
2
Recent Posts

Leave a Comment

Your email address will not be published. Required fields are marked *