RUN_TIME ERROR .. Can't figure out why??

my code : : RkNTKK - Online C++ Compiler & Debugging Tool - Ideone.com

problem link : : SPOJ.com - Problem ELIS

I m still a beginner . Suggestions , if my logic or code is wrong :slight_smile: !