当前位置:网站首页>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);
}
}
}
}
}
}
边栏推荐
- Blue style mall website footer code
- Pelosi: Congress will soon have legislation against members' stock speculation
- Safety science to | travel, you must read a guide
- [slam] lidar camera external parameter calibration (Hong Kong University marslab) does not need a QR code calibration board
- Flask learning and project practice 8: introduction and use of cookies and sessions
- SAP ALV cell level set color
- MADDPG的pythorch实现——(1)OpenAI MADDPG环境配置
- three. JS page background animation liquid JS special effect
- Recommended foreign websites for programmers to learn
- MySQL Server层四个日志
猜你喜欢
BUAA magpie nesting
教你用Pytorch搭建一个自己的简单的BP神经网络( 以iris数据集为例 )
LTE CSFB test analysis
下一个行业风口:NFT 数字藏品,是机遇还是泡沫?
js凡客banner轮播图js特效
2. GPIO related operations
ASU & OSU | model based regularized off-line meta reinforcement learning
蓝色样式商城网站页脚代码
Teach you to build your own simple BP neural network with pytoch (take iris data set as an example)
数据分析——seaborn可视化(笔记自用)
随机推荐
StrError & PERROR use yyds dry inventory
暑期刷题-Day3
Leetcode problem solving -- 99 Restore binary search tree
11. Container with the most water
【SLAM】ORB-SLAM3解析——跟踪Track()(3)
SAP ALV颜色代码对应颜色(整理)
【Qt5】Qt QWidget立刻出现并消失
SAP ALV color code corresponding color (finishing)
Shell pass parameters
指针笔试题~走近大厂
Schnuka: visual positioning system working principle of visual positioning system
多项目编程极简用例
Data analysis Seaborn visualization (for personal use)
Lua uses require to load the shared library successfully, but the return is Boolean (always true)
Pytoch foundation - (1) initialization of tensors
A brief introduction to symbols and link libraries in C language
pytorch加载数据
SD card reports an error "error -110 whilst initializing SD card
[Li Kou] the second set of the 280 Li Kou weekly match
SD卡報錯“error -110 whilst initialising SD card