Skip to main content

Posts

Showing posts with the label Educational Codeforces Round 59

educational codeforces round 59(B. Digital root)

  Problem solving technique:Patten 1 = 1    10 = 1 + 0 = 1     19 = 1 + 9 = 10 = 1 + 0 = 1 2 = 2    11 = 1 + 1 = 2     20 = 2 + 0 = 2 3 = 3    12 = 1 + 2 = 3     21 = 2 + 1 = 3 4 = 4    13 = 1 + 3 = 4     22 = 2 + 2 = 4 5 = 5    14 = 1 + 4 = 5     23 = 2 + 3 = 5 6 = 6    15 = 1 + 5 = 6     24 = 2 + 4 = 6 7 = 7    16 = 1 + 6 = 7     25 = 2 + 5 = 7 8 = 8    17 = 1 + 7 = 8     26 = 2 + 6 = 8 9 = 9    18 = 1 + 8 = 9     27 = 2 + 7 = 9 After  9 th interval we got same digital root ///Bismillahir Rahmanir Rahim ///Author: Tanvir Ahmmad ///CSE,Islamic University,Bangladesh #include< iostream > #include< cstdio > #include< algorithm > #include< string > #include< cstring ...