Remainder with 7
Basic Accuracy: 50.0% Submissions: 11806 Points: 1

Given a number as string(n) , find the remainder of the number whe it is divided by 7

Example 1:

Input:
5
Output:
5

 

Example 2:

Input:
8
Output:
1

 

Your Task:

You only need to complete the function remainderwith7() that takes string n as parameter and returns an integer which denotes the remainder of the number when its divided by 7

 

Constraints:
1<=length of n <=105

 

We are replacing the old Disqus forum with the new Discussions section given below.
Click here to view old Disqus comments.


to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.

Remainder with 7

Output Window