ACM (UVa) : 11522


There are 47 strictly non-pyramid numbers:

2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 33, 34, 35, 36, 39, 40, 41, 42, 44, 46, 47, 48, 49, 51, 56, 58, 63, 68, 70, 72, 77

if a number doesn’t fall in the given list then its a pyramid number.

Critical Input:
10 1
11 1
100 1

Critical Output:
1
2
53

4 thoughts on “ACM (UVa) : 11522

  1. I think either you haven’t solved the problem or there’s a great mistake.
    because there r not 47(!) strictly pyramid numbers. The list you’ve given on the top is the list of non strictly pyramid numbers!
    Without these numbers all are strictly pyramid numbers.

    Thanks,
    Muhammed Hedayetul Islam,
    Southeast University.

  2. @Muhammed Hedayetul Islam
    yes, you are absolutely right
    there is a mistake … and it’s somewhat great
    the post has been updated
    Thank you. 🙂

  3. I don’t know why I was so excited that day to write such non sense comment. Please don’t mind. I am really sorry for that bad type of comment. I think my reply was so hursh. Again I am sorry. I found that comment today and I feel very shamed. Thank you for tolerating that.
    Thanks again.
    ~Muhammed Hedayet.

  4. hey its ok, never mind. i didn’t take that another way. truly, there was some mistakes and u just pointed it out, nothing else. i appreciate your concern. Thank you 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s