当前位置:网站首页>Blue Bridge Cup - Castle formula
Blue Bridge Cup - Castle formula
2022-07-06 03:37:00 【Deduce life】
1. subject

2. Ideas Violence starts with 10000 Find the matching number Do it for the first time Five unequal conditions mean wrong Then improved The code is quite long
3. Code
public class J84 {
public static void main(String[] args) {
for(int i=10000;i<100000;i++) {
int a=i/10000;// Ten thousand position
int b=i/1000%10;// Thousand bit
int c=i/100%10;// Hundred bit
int d=i/10%10;// ten
int e=i%10;// bits
int f=e*10000+d*1000+c*100+b*10+a;// Turn into EDCBA
for(int j=1;j<10;j++) {// The condition that five numbers are not equal to each other
if(a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=d&&b!=e&&c!=d&&c!=e&&d!=e) {
if(i*j==f) {
System.out.println(i);
}
}
}
}
}
}边栏推荐
- Flask learning and project practice 9: WTF form verification
- Introduction to DeNO
- Safety science to | travel, you must read a guide
- Lua uses require to load the shared library successfully, but the return is Boolean (always true)
- Schnuka: what is visual positioning system and how to position it
- Restful style
- Computer graduation project asp Net fitness management system VS development SQLSERVER database web structure c programming computer web page source code project
- Tidb ecological tools (backup, migration, import / export) collation
- Yyds dry inventory what is test driven development
- 2.1 rtthread pin设备详解
猜你喜欢

Redo file corruption repair

MPLS experiment

ASU & OSU | model based regularized off-line meta reinforcement learning

C language circular statement

Flask learning and project practice 8: introduction and use of cookies and sessions

On Data Mining

Factors affecting user perception

遥感图像超分辨率论文推荐

数据分析——seaborn可视化(笔记自用)

11. Container with the most water
随机推荐
Schnuka: 3D vision detection application industry machine vision 3D detection
Tomb. Weekly update of Finance (February 7 - February 13)
Deep parsing pointer and array written test questions
Restful style
Map sorts according to the key value (ascending plus descending)
IPv6 comprehensive experiment
指针笔试题~走近大厂
Flask learning and project practice 9: WTF form verification
暑期刷题-Day3
深入刨析的指针(题解)
ASU & OSU | model based regularized off-line meta reinforcement learning
svg拖动点裁剪图片js特效
Item 10: Prefer scoped enums to unscoped enums.
Record the process of reverse task manager
Svg drag point crop image JS effect
Esbuild & SWC: a new generation of construction tools
A brief introduction to symbols and link libraries in C language
The solution of permission denied (750 permissions should be used with caution)
Pelosi: Congress will soon have legislation against members' stock speculation
11. Container with the most water