I have attempted the problem 'SMALL' from SPOJ http://www.spoj.com/problems/SMALL/1. Here http://ideone.com/oPuOvC3) is the code.

It works fine on CodeBlocks but gives runtime error on ideone, due to overflow.

For example, there is no output for inputs like 5000 or 10000. How do I correct this?

P.S. I've just recently started coding in C++ having knowledge only in C so suggestions on making the code 'cleaner' will be helpful.

  • created

    Jun '15
  • last reply

    Jul '15
  • 1

    reply

  • 491

    views

  • 2

    users

  • 2

    links

The url to ideone is not correct (")" is obsolet)

Regarding your code: What are your considerations fo this line of code:

        ll b[200];

Suggested Topics

Topic Category Replies Views Activity
C and C++ 0 13 5d

Want to read more? Browse other topics in C and C++ or view latest topics.