In addition to countless number 1012.8

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_16525829/article/details/102773104

Title Description

A natural number is divided by 8 more than 1, the quotient is divided by 8 is also more than 1, then the second quotient is more than 7 after 8 except the last to give a quotient of a. Is also known that this natural numbers are 17 other than 4. 17 in addition to the quotient is more than 15, most get a quotient of two times a. find the natural number.

Enter
this question did not enter

Output
this number n

Sample output
output line, indicating that the number of

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n=9;
    int a=0;
    while(n++)
    {
        if(n%8==1&&n/8%8==1)
        {
            if(n/8/8%8==7)
            {
                a=n/8/8/8;
                if(n%17==4&&n/17%17==15&&n/17/17==2*a)
                {
                cout<<n;
                break;
                }
            }
        }
    }
    return 0;
}

Guess you like

Origin blog.csdn.net/qq_16525829/article/details/102773104