ARC116 - A - Odd vs Even
/* There is a pattern to solve this problem: 1 -> odd 2 -> same 3 -> odd 4 -> even 5 -> odd 6 -> same 7 -> odd 8 -> even 9 -> odd 10 -> same 11 -> odd 12 -> even 13 -> odd 14 -> same 15 -> odd 16 -> even 17 -> odd 18 -> same 19 -> odd 20 -> even Observation: 1. same number of even and odd divisors are repeating after 4 steps 2. we are getting more even number of divisors which is divided by 4 3. a typical odd number is generating much number of odd divisors Now, let's implement those observations... */ #include <bits/stdc++.h> using namespace std; #define sf ...