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