Codechef : Program to find if given very large number is divisible by 3 or not
Multiple of 3 Problem Code: MULTHREE Consider a very long K -digit number N with digits d 0 , d 1 , ..., d K-1 (in decimal notation; d 0 is the most significant and d K-1 the least significant digit). This number is so large that we can't give it to you on the input explicitly; instead, you are only given its starting digits and a way to construct the remainder of the number. Specifically, you are given d 0 and d 1 ; for each i ≥ 2, d i is the sum of all preceding (more significant) digits, modulo 10 — more formally, the following formula must hold: Determine if N is a multiple of 3. Example 3 5 3 4 13 8 1 760399384224 5 1 NO YES YES Java Solution : //codechef very very long number Multiple of three // https://www.codechef.com/LRNDSA01/problems/MULTHREE ...