Lucky Division
Time Limit:2000MS    Memory Limit:262144KB    64bit IO Format:%I64d & %I64u

Description

Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.

Petya calls a number almost lucky if it could be evenly divided by some lucky number. Help him find out if the given number n is almost lucky.

Input

The single line contains an integer n(1

  • 收藏
  • 评论
  • 举报

上一篇:HDU1051 Wooden Sticks

下一篇:背包九讲