Problem in Data Types

Sir, not able to understand why only “double” works and not “long long int” in this code.
Question link => Question
Solution link => Solution