Thinking about getting good at competitive programming, especially on a platform like CodeChef? It can seem like a big hill to climb at first, but honestly, it’s totally doable. This guide breaks down ...
ll fact(ll n) { if(n==0) return 1; ll res = 1; for (ll i = 2; i <= n; i++) res = res * i; return res; } ...
Codechef Starters 232 Solved: 3/7 My approaches: 1) if (n < 7) return n otherwise return 7 2) i) Find max and min elements. ii) Count each element which is not max or min. iii) Return count 3) i) ...