当前位置:网站首页>Blue Bridge Cup -- guess age
Blue Bridge Cup -- guess age
2022-07-03 22:25:00 【Deduce life】
1. subject

2. Ideas The stupid way I used Find out what matches Then see if 0 To 9 Once
3. Code
public class J85 {
public static void main(String[] args) {
for(int i=11;i<100;i++) {
int a=i*i*i;
int b=i*i*i*i;
int c=a/10000;// Yes a Value decomposition of
int d=a/1000%10;
int e=a/100%10;
int f=a/10%10;
int g=a%10;
int h=b/100000;// Yes b Value decomposition of
int q=b/10000%10;
int p=b/1000%10;
int o=b/100%10;
int l=b/10%10;
int k=b%10;
if(c+d+e+f+g+h+q+p+o+l+k==45) {//0 To 9 Once And for 45( Don't rule out accidental situations , We are just looking for the right value )
System.out.println(i+" "+a+" "+b);
}
}
}
}Be careful : According to the output value Find out Instead of finding it all at once In short, my program is not standard But you can also find the answer
4. summary Brush problem
边栏推荐
- Investment analysis and prospect trend prediction report of China's boron nitride industry Ⓨ 2022 ~ 2028
- 6.0 kernel driver character driver
- China HDI market production and marketing demand and investment forecast analysis report Ⓢ 2022 ~ 2028
- Oil monkey plug-in
- Niuke winter vacation training camp 4 g (enumeration optimization, Euler power reduction)
- [sg function]split game (2020 Jiangxi university student programming competition)
- js demo 計算本年度還剩下多少天
- DR882-Qualcomm-Atheros-QCA9882-2T2R-MIMO-802.11ac-Mini-PCIe-Wi-Fi-Module-5G-high-power
- Ansible common usage scenarios
- [sg function] 2021 Niuke winter vacation training camp 6 h. winter messenger 2
猜你喜欢

JS closure knowledge points essence

540. Single element in ordered array

6.0 kernel driver character driver

Collection | pytoch common loss function disassembly

UC Berkeley proposes a multitask framework slip

1068. Consolidation of ring stones (ring, interval DP)

Control loop of program (while loop)

How can enterprises and developers take advantage of the explosion of cloud native landing?

The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation

2 spark environment setup local
随机推荐
The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation
Functions and differences between static and Const
[dynamic programming] Jisuan Ke: Jumping stake (variant of the longest increasing subsequence)
Cognitive fallacy: Wittgenstein's ruler
Cognitive fallacy: what is Fredkin's paradox
[SRS] build a specified version of SRS
Go language slice interview real question 7 consecutive questions
Cognitive fallacy: what is dimensional curse
Introduction to kubernetes
Data consistency between redis and database
Common problems in multi-threaded learning (I) ArrayList under high concurrency and weird hasmap under concurrency
QGIS grid processing DEM data reclassification
[automation operation and maintenance novice village] flask-2 certification
Asynchronous artifact: implementation principle and usage scenario of completable future
The difference between SRAM and DRAM
The latest analysis of crane driver (limited to bridge crane) in 2022 and the test questions and analysis of crane driver (limited to bridge crane)
2022 high altitude installation, maintenance and removal of examination question bank and high altitude installation, maintenance and removal of examination papers
1 Introduction to spark Foundation
Report on the development strategy of China's engineering bidding agency and suggestions for the 14th five year plan Ⓙ 2022 ~ 2028
(POJ - 2912) rochambau (weighted concurrent search + enumeration)