HBC244824逃跑路线,枚举,位运算Guess The Number题解

冷夕颜 算法基础篇 64 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
Lucy and Vega are playing a game named Guess The Number .P is . If there are multiple answers , tell Vega the minimum one .

Lucy and Vega are playing a game named Guess The Number . In this game , Lucy selects a decimal number P P randomly , then converts P P into base 2,3,5,7,11 2,3,5,7,11 (We call them A A, B B, C C, D D, E E). Such as : P=10 P=10 , then A=(1010)_2 A=(1010) 2 ​ , B=(101)_3 B=(101) 3 ​ , C=(20)_5 C=(20) 5 ​ , D=(13)_7 D=(13) 7 ​ , E=(A)_{11} E=(A) 11 ​ ( here A A means 10 10 in decimal ) . Lucy defines A_i A i ​ as the i i-th (igeq0) (i≥0) digit of A A , B_i,C_i,D_i,E_i B i ​ ,C i ​ ,D i ​ ,E i ​ uses the same method . Such as : A=(1010)_2 A=(1010) 2 ​ , A_0=0,A_1=1,A_2=0,A_3=1,A_4=0,A_5=0,text{...} A ​ =0,A 1 ​ =1,A 2 ​ =0,A 3 ​ =1,A 4 ​ =0,A 5 ​ =0,... Then for each i i in range [0,36] [0,36] ( inclusive ) , Lucy gets F_i=A_i+B_i+C_i+D_i+E_i F i ​ =A i ​ +B i ​ +C i ​ +D i ​ +E i ​ ( in decimal ) . After that , Lucy tells F_0,F_1,F_2,...,F_{36} F ​ ,F 1 ​ ,F 2 ​ ,...,F 36 ​ to Vega , and Vega needs to guess the number P P . Please help Vega to find what P P is . If there are multiple answers , tell Vega the minimum one .

HBC244824逃跑路线,枚举,位运算Guess The Number题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
全网最全C++题库,助您挑战自我,突破极限,成为编程领域的佼佼者!

标签: HBC244824逃跑路线 枚举 位运算Guess The Number题解