当前位置:网站首页>【集训Day2】Torchbearer
【集训Day2】Torchbearer
2022-07-26 16:55:00 【SSL_GYX】
Torchbearer

解题思路
直接暴力枚举 01 01 01 数字串,暴力判断即可。(非正解,但能过)
code
#include<iostream>
#include<cstring>
#include<cstdio>
#define int long long
using namespace std;
int n;
int d[20],tot;
int add(int i)
{
tot=0,i++;
memset(d,0,sizeof(d));
int t=0;
while(i)
{
d[++tot]+=i%10;
if(d[tot]==2)
d[tot+1]=1,d[tot]=0;
i/=10;
}
if(d[tot+1]) tot++;
for(;tot;tot--) i=i*10+d[tot];
return i;
}
signed main()
{
cin>>n;
for(int i=1;i<=1e18;)
{
if(i%n==0&&i>n)
return printf("%lld\n",i/n),0;
i=add(i);
}
printf("no solution\n");
}
边栏推荐
- RedisDesktopManager去除升级提示
- [cloud native] IVX low code development was introduced into Tencent map and previewed online
- Is it safe to open an account online now? Who do you want to open a stock account?
- 云渲染-体积云【理论基础与实现方案】
- 2019普及组总结
- Diagram of seven connection modes of MySQL
- 浅析接口测试
- VIM visualization mode and its usage
- kaggle猫狗数据集开源——用于经典CNN分类实战
- GAN (Generative Adversarial Network,GAN)生成式对抗网络
猜你喜欢

SQL中去去重的三种方式

一文详解吞吐量、QPS、TPS、并发数等高并发指标

The diagram of user login verification process is well written!

Open source kaggle cat and dog data set -- used in classic CNN classification practice

Performance tuning bugs emerge in endlessly? These three documents can easily handle JVM tuning

(25) top level menu of blender source code analysis blender menu
![[C language classic topic exercise 2]](/img/66/8dbfefe585aa35f5791f04b376b75c.png)
[C language classic topic exercise 2]
2.1.2 同步始终失败

How to use different tools to analyze and optimize code performance when CPU utilization is high

(24) the top menu of blender source code analysis shows code analysis
随机推荐
Summer Challenge openharmony greedy snake based on JS
大咖访谈 | 开源对安全是双刃剑——《大教堂与集市》中文译本作者卫剑钒
(24)Blender源码分析之顶层菜单显示代码分析
What is a test case? How to design?
leetcode:1206. 设计跳表【跳表板子】
Is it safe for Huishang futures to open an account online? What is the account opening process?
【云原生】 iVX 低代码开发 引入腾讯地图并在线预览
国际象棋机器人夹断7岁男孩手指,原因是「棋手违反安全规则」?
CCS TM4C123新建工程
点击劫持攻击
We were tossed all night by a Kong performance bug
JS function scope variables declare that the variables that promote the scope chain without VaR are global variables
2.1.2 同步始终失败
Application of machine vision in service robot
How to use different tools to analyze and optimize code performance when CPU utilization is high
How to write plug-ins quickly with elisp
JS recursive Fibonacci sequence deep cloning
About the adjustment of the game background, reading this article is enough
Environment setup mongodb
2022 年有哪些流行的技术?