当前位置:网站首页>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
边栏推荐
- Summary of basic knowledge of exception handling
- Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?
- 2022 G3 boiler water treatment registration examination and G3 boiler water treatment examination papers
- JS Demo calcule combien de jours il reste de l'année
- [secretly kill little partner pytorch20 days] - [day3] - [example of text data modeling process]
- [Android reverse] use the DB browser to view and modify the SQLite database (copy the database file from the Android application data directory | use the DB browser tool to view the data block file)
- Leetcode week 4: maximum sum of arrays (shape pressing DP bit operation)
- Sow of PMP
- Market layout planning and latest dynamic analysis report of China's smart public security industry Ⓕ 2022 ~ 2028
- [dynamic planning] counting garlic customers: the log of garlic King (the longest increasing public subsequence)
猜你喜欢

Programming language (1)

What indicators should be paid attention to in current limit monitoring?

Pooling idea: string constant pool, thread pool, database connection pool

Pat grade A - 1164 good in C (20 points)

The overseas listing of Shangmei group received feedback, and brands such as Han Shu and Yiye have been notified for many times and received attention

4 environment construction -standalone ha

Electronic tube: Literature Research on basic characteristics of 6j1

Teach you how to run two or more MySQL databases at the same time in one system
![[dynamic programming] Ji Suan Ke: Suan tou Jun breaks through the barrier (variant of the longest increasing subsequence)](/img/6c/2d48d441fee1981a271319fd9f6c23.jpg)
[dynamic programming] Ji Suan Ke: Suan tou Jun breaks through the barrier (variant of the longest increasing subsequence)

This time, thoroughly understand bidirectional data binding 01
随机推荐
SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]
Niuke winter vacation training camp 4 g (enumeration optimization, Euler power reduction)
[flax high frequency question] leetcode 426 Convert binary search tree to sorted double linked list
1068. Consolidation of ring stones (ring, interval DP)
Miscellaneous things that don't miss the right business
Data consistency between redis and database
6.0 kernel driver character driver
Mysql database - Advanced SQL statement (I)
2022 high altitude installation, maintenance and removal of examination question bank and high altitude installation, maintenance and removal of examination papers
How to switch between dual graphics cards of notebook computer
1 Introduction to spark Foundation
320. Energy Necklace (ring, interval DP)
Rest reference
Is the account opening of Guotai Junan Securities safe and reliable? How to open Guotai Junan Securities Account
regular expression
Sed、Awk
Programming language (1)
DOM light switch case
Ansible common usage scenarios
JS Demo calcule combien de jours il reste de l'année