首页 > 其他分享 >18th

18th

时间:2023-05-11 16:22:07浏览次数:20  
标签:10 数字 int 18th 对称 using

#include <iostream>
using namespace std;
int main(){
//对称数 对数字分解问题

//一般都要进行对数的取余 然后将数字存起来 方便比较
int x=95859;//初始里程表 求两个小时后另一个 对称数
int a[5];
for(int i=95860;;i++){
int p=i;
for(int j=0;j<=4;j++){
a[j]=p%10;
p=p/10;

}
if((a[0]==a[4])&&(a[1]==a[3]))
{
cout<<(i-x)/2;
break;
}
}
}

标签:10,数字,int,18th,对称,using
From: https://www.cnblogs.com/wcy1111/p/17391420.html

相关文章

  • 18th-19th
    [1]二叉树基本概念(三种遍历)+不用递归模式的遍历:4种+层次遍历法(用queue来帮助实现)[2]queue:https://www.weixueyuan.net/a/hbkjae.html[3]hashMaphttps://blog.cs......
  • The 18th Zhejiang Provincial Collegiate Programming Contest题解
    A.LeagueofLegends水题。点击查看代码#include<bits/stdc++.h>usingnamespacestd;#defineintlonglonginta[6];intb[6];signedmain(){for(......
  • 18th 2022/7/15 模拟赛总结10
    这次哈,依然不大想打随便一打,却发现排名居然没掉,其他人摸鱼吗?其实这次比赛题质量不算很高T1是优化,T2是优化+细节,T3是打过类似的找循环,T4是DP优化嗯,因为要回去了所以没......