CodeforcesRound #262 (div2) B. LittleDimaandEquation

Source: Internet
Author: User
LittleDimamisbehavedduringamathlessonalotandthenastyteacherMr. Picklesgavehimthefollowingproblemasapunishment. Findallintegersolutionsx (0 ?? X ?? 109) oftheequation: x ?? B · s (x) ?? C ,? Wherea, B, c

Little Dima misbehaved during a math lesson a lot and the nasty teacher Mr. Pickles gave him the following problem as a punishment. Find all integer solutions x (0 ?? X ?? 10 9) of the equation: x? =? B · s (x) ?? C ,? Where a, B, c

Little Dima misbehaved during a math lesson a lot and the nasty teacher Mr. Pickles gave him the following problem as a punishment.

Find all integer solutionsX(0? X?

X? =? B· S( X) A? +? C,?

WhereA,B,CAre some predetermined constant values and functionS(X) Determines the sum of all digits in the decimal representation of numberX.

The teacher gives this problem to Dima for each lesson. He changes only the parameters of the equation:A,B,C. Dima got sick of getting bad marks and he asks you to help him solve this challenging problem.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.