Given N and seed, find the smallest positive integer m such that the sum of all numbers
from 1 to m that are not divisible by (seed + 2) is at least N.
Print both:
the value of m
the computed sum
Input Format: Take N and seed using prompt(). Output Format: Show m and the sum clearly using alert(). Constraints: 1 ≤ N ≤ 10^6, 0 ≤ seed ≤ 9
Solution:
Press the button to execute JS solution of the question.