Problem Link: Problem - A - Codeforces
my solution: K9ayrX - Online C++ Compiler & Debugging Tool - Ideone.com
my solution is running on other compilers but not accepting on codeforces , why?
its giving error like this given below:
Invocation failed [COMPILATION_ERROR]
Can’t compile file:
program.cpp
program.cpp(12): error C2131: expression did not evaluate to a constant
program.cpp(12): note: failure was caused by a read of a variable outside its lifetime
program.cpp(12): note: see usage of ‘n’
program.cpp(13): warning C4552: ‘>>’: operator has no effect; expected operator with side-effect
program.cpp(17): warning C4552: ‘<<’: operator has no effect; expected operator with side-effect
program.cpp(21): warning C4552: ‘<<’: operator has no effect; expected operator with side-effect
=====
Used: 0 ms, 0 KB