[csu1392] YY a bit

Source: Internet
Author: User

Test instructions: Given x, how many 10^8 within the number to satisfy this number multiplied by x, the highest bit to the lowest bit. Set the number of the highest bit and the remaining length, the column equation reasoning can be.

1 #pragmaComment (linker, "/stack:10240000,10240000")2 3#include <iostream>4#include <cstdio>5#include <algorithm>6#include <cstdlib>7#include <cstring>8#include <map>9#include <queue>Ten#include <deque> One#include <cmath> A#include <vector> -#include <ctime> -#include <cctype> the#include <Set> -  - using namespacestd; -  + #defineMem0 (a) memset (a, 0, sizeof (a)) - #defineLson L, M, RT << 1 + #defineRson m + 1, R, RT << 1 | 1 A #definedefine_m int m = (L + r) >> 1 at #defineRep (A, b) for (int a = 0; a < b; a++) - #defineLowbit (x) ((x) & (-(x))) - #defineCONSTRUCTINT4 (name, a, B, C, D) name (int a = 0, int b = 0, int c = 0, int d = 0): A (a), B (b), C (c), D (d) {} - #defineCONSTRUCTINT3 (name, a, B, c) name (int a = 0, int b = 0, int c = 0): A (a), B (b), C (c) {} - #defineConstructInt2 (name, a, b) name (int a = 0, int b = 0): A (a), B (b) {} -  intypedefDoubledb; -typedefLong LongLL; totypedef pair<int,int>PII; +typedef multiset<int>MSI; -typedef multiset<int>:: iterator msii; thetypedefSet<int>si; *typedefSet<int>:: iterator sii; $typedef vector<int>VI;Panax Notoginseng  - Const intdx[8] = {1,0, -1,0,1,1, -1, -1}; the Const intdy[8] = {0, -1,0,1, -1,1,1, -1}; + Const intMAXN = 1e5 +7; A Const intMAXM = 1e5 +7; the Const intMAXV = 1e7 +7; + Const intMD = 1e9 +7; - Const intINF = 1e9 +7; $ Const DoublePI = ACOs (-1.0); $ Const DoubleEPS = 1e-Ten; -  - intDigit (LL x) { the     intCNT =0; -      while(x) {Wuyicnt++; theX/=Ten; -     } Wu     returnCNT; - } About  $ intMain () { -     //freopen ("In.txt", "R", stdin); -     DoubleTX; -      while(Cin >>tx) { ALL x = (int) (TX *10000+0.5),Get=0; +         if(x >=100000) { thePuts"No Solution"); -             Continue; $         } theLL p =1; the          for(inti =0; I <=7; i++) { the              for(intK =1; K <=9; k++) { theLL tmp = k * (x * p-1e4); -                 if(tmp% (LL) (1e5-x))Continue; inTMP/= 1E5-x; the                 if(digit (TMP) = =i) { theprintf"%d", k); About                     if(tmp >0) printf ("%d", TMP); thePuts""); the                     Get=1; the                 } +             } -P *=Ten; the         }Bayi         if(!Get) puts ("No Solution"); the     } the     return 0; -}
View Code

[csu1392] YY a bit

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.