当前位置:网站首页>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);
}
}
}
}
}
}
边栏推荐
- C language judgment, ternary operation and switch statement usage
- 3.2 rtthread 串口设备(V2)详解
- ArabellaCPC 2019(补题)
- C language circular statement
- UDP reliable transport protocol (quic)
- 2.2 STM32 GPIO操作
- three. JS page background animation liquid JS special effect
- Recommended foreign websites for programmers to learn
- JS music online playback plug-in vsplayaudio js
- Explore pointers and pointer types in depth
猜你喜欢
Pytorch load data
Exness foreign exchange: the governor of the Bank of Canada said that the interest rate hike would be more moderate, and the United States and Canada fell slightly to maintain range volatility
多项目编程极简用例
1.16 - 校验码
数据分析——seaborn可视化(笔记自用)
2.13 weekly report
1. New project
EDCircles: A real-time circle detector with a false detection control 翻译
Getting started with applet cloud development - getting user search content
Princeton University, Peking University & UIUC | offline reinforcement learning with realizability and single strategy concentration
随机推荐
BUAA喜鹊筑巢
Schnuka: what is visual positioning system and how to position it
RT thread -- FTP of LwIP (2)
Overview of super-resolution reconstruction of remote sensing images
Performance analysis of user login TPS low and CPU full
MPLS experiment
Cross origin cross domain request
Force buckle 1189 Maximum number of "balloons"
[rust notes] 18 macro
Tomb. Weekly update of Finance (February 7 - February 13)
暑期刷题-Day3
真机无法访问虚拟机的靶场,真机无法ping通虚拟机
Four logs of MySQL server layer
svg拖动点裁剪图片js特效
2、GPIO相关操作
Deep parsing pointer and array written test questions
Leetcode problem solving -- 173 Binary search tree iterator
BUAA magpie nesting
Indicator system of KQI and KPI
记录一下逆向任务管理器的过程