UVa 382

From Algorithmist
Jump to: navigation, search

Contents

[edit] 382 - Perfection

[edit] Summary

  • Find if the sum of the divisors are greater than, less than or equal to the number provided.

[edit] Explanation

  • If num > sum divisors output deficient
  • If num < sum divisors output abundant
  • If num == sum output Perfect

[edit] Gotchas

  • the END OF OUTPUT line must be followed by a '\n'

[edit] Input

15 28 6 56 60000 22 496 0

Test avoid the more simple case:

1

The answer need to be DEFICIENT.

[edit] Output

PERFECTION OUTPUT
   15  DEFICIENT
   28  PERFECT
    6  PERFECT
   56  ABUNDANT
60000  ABUNDANT
   22  DEFICIENT
  496  PERFECT
END OF OUTPUT
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox