Snail-1-9 The 9 numbers are divided into three 3 digits, the first one is twice times the second to third, 3 times times

Source: Internet
Author: User

1-9 These 9 numbers are divided into three 3-digit numbers, the first of which is the second to third twice times, and 3 times times void Mygetthreenum () {        int j,k;    int <span style= "font-family:arial, Helvetica, Sans-serif;" >arr</span><span style= "font-family:arial, Helvetica, Sans-serif;" >[10],sum;</span>    for (int i = 123; I * 3 < 987; i++) {        //the previous sizeof (int) * 10 bytes of arr is cleared to 0        memset ( arr,0,sizeof (int) *);                ARR[I/100] = 1;        Arr[i/10%] = 1;        Arr[i%] = 1;                j = i * 2;        ARR[J/100] = 1;        Arr[j/10%] = 1;        Arr[j%] = 1;                K = i * 3;        ARR[K/100] = 1;        Arr[k/10%] = 1;        Arr[k%] = 1;                sum = 0;        for (int x = 1; x < n × x + +) {            sum + = arr[x];        }        if (sum = = 9) {            printf ("a =%d,b =%d,c =%d\n", k,j,i);}}}    

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Snail-1-9 The 9 numbers are divided into three 3 digits, the first one is twice times the second to third, 3 times times

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.