hello codeforces i was wondering why do i have to use int while long long is more useful today i found the answer : using long long :http://codeforces.net/contest/543/submission/22092332 using int : http://codeforces.net/contest/543/submission/22092593 hope this help thanks