C language · Guessing Riddles

Source: Internet
Author: User

Title: Guessing Riddles

A puzzle on the Lantern Festival in village A:

Please guessing the Riddle = Please guess by the Light side

Xiao Ming thought, must be each Chinese character represents a number, different Chinese characters represent different numbers.

Please use the computer according to Xiao Ming's ideas, and then submit "please guessing" three words represented by the integer can.

Please submit your answers in the form of a browser in strict format.
Note: Submit only a 3-bit integer, and do not write additional content, such as descriptive text.

1 /*8 9 7*/2#include <string.h>3#include <stdio.h>4 BOOLuse[Ten];//Access Tag Array5 inta[Ten];6 7 voidDfsintbegin) {  8     if(begin==6){9         intyin1=a[0]* -+a[1]*Ten+a[2];Ten         intyin2=a[0]* -+a[1]*Ten+a[2]; One         intyin3=a[0]*100000+a[3]*10000+a[4]* ++a[5]* -+a[6]*Ten+a[1]; A         if(yin1*yin2==yin3) { -printf"%d%d%d\n", a[0],a[1],a[2]); -         } the         return; -     }   -      for(intI=0; i<=9; i++){ -         if(!Use[i]) { +Use[i] =true; -a[begin]=i; +DFS (begin+1); AUse[i] =false; at         } -     }   - }   - intMain () { -memset (use,false,sizeof(use)); -Dfs0); in     return 0; -}

C language · Guessing Riddles

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.