Remainder When Divided By 11 Problem Statement

Determine the remainder when a given number, 'N' in the form of a string, is divided by 11.

Input:

The first line contains an integer 'T' denoting the number of test cases. 
Each test case consists of a single line containing the number 'N' as a string.

Output:

For each test case, print an integer representing the remainder when 'N' is divided by 11.

Example:

Input:
T = 1
N = '1234567890'
Output:
3

Constraints:

  • 1 ≤ T ≤ 5
  • 1 ≤ length of N ≤ 106

Note:
The number N can be very large.

Be the first one to answer
Add answer anonymously...
Amazon Software Developer Intern Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter