当前位置:网站首页>[PTA] get rid of singles
[PTA] get rid of singles
2022-04-23 20:22:00 【Maybe】
subject

Their thinking
Imitation Division
1. Accumulate first 1, Until it's bigger than the divisor ( Now you can divide by the divisor )
2. Get the result of division and the remainder of division , Output the result of dividing by
3. Move backward , Fill a
4. repeat 2、3, until 2 The remainder is 0 Stop when
ac Code
#include<iostream>
using namespace std;
int main() {
int n, k = 1, cnt = 1;
cin >> n;
while(k < n) {
k = k * 10 + 1;
cnt++;
}
while(1) {
if(k % n == 0) {
cout << k / n << cnt;
break;
} else {
cout << k / n;
k %= n;
k = k * 10 + 1;
cnt++;
}
}
return 0;
}
版权声明
本文为[Maybe]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204232020000426.html
边栏推荐
- An error is reported in the initialization metadata of the dolphin scheduler -- it turns out that there is a special symbol in the password. "$“
- Cadence Orcad Capture 批量更改元件封装功能介绍图文教程及视频演示
- Unity 模型整体更改材质
- PCL点云处理之计算两平面交线(五十一)
- 中金财富公司怎么样,开户安全吗
- Es index (document name) fuzzy query method (database name fuzzy query method)
- SQL gets the latest record of the data table
- ArcGIS js api 4. X submergence analysis and water submergence analysis
- 2022 - Data Warehouse - [time dimension table] - year, week and holiday
- 网络通信基础(局域网、广域网、IP地址、端口号、协议、封装、分用)
猜你喜欢
![[talkative cloud native] load balancing - the passenger flow of small restaurants has increased](/img/ba/4ccf0c2181572fed16bbc9c797d557.png)
[talkative cloud native] load balancing - the passenger flow of small restaurants has increased

【目标跟踪】基于帧差法结合卡尔曼滤波实现行人姿态识别附matlab代码

网络通信基础(局域网、广域网、IP地址、端口号、协议、封装、分用)

How can matlab obtain the truncated image in trainingimagelabeler
![Es error: request contains unrecognized parameter [ignore_throttled]](/img/17/9131c3eb023b94b3e06b0e1a56a461.png)
Es error: request contains unrecognized parameter [ignore_throttled]
![[target tracking] pedestrian attitude recognition based on frame difference method combined with Kalman filter, with matlab code](/img/30/39de1628cb47f715056fb898955ff5.png)
[target tracking] pedestrian attitude recognition based on frame difference method combined with Kalman filter, with matlab code

波场DAO新物种下场,USDD如何破局稳定币市场?

Monte Carlo py solves the area problem! (save pupils Series)

Devexpress 14.1 installation record

上海回應“面粉官網是非法網站”:疏於運維被“黑”,警方已立案
随机推荐
The flinkcdc reports an error: but this is no longer available on the server
Cadence Orcad Capture CIS更换元器件之Link Database 功能介绍图文教程及视频演示
論文寫作 19: 會議論文與期刊論文的區別
go-zero框架数据库方面避坑指南
What is the difference between a host and a server?
Monte Carlo py solves the area problem! (save pupils Series)
R语言ggplot2可视化分面图(facet_wrap)、使用lineheight参数自定义设置分面图标签栏(灰色标签栏)的高度
Redis distributed lock
The second method of file upload in form form is implemented by fileitem class, servletfileupload class and diskfileitemfactory class.
Change the material of unity model as a whole
Recommend an open source free drawing software draw IO exportable vector graph
JDBC tool class jdbcconutil gets the connection to the database
论文写作 19: 会议论文与期刊论文的区别
Sqoop imports data from Mysql to HDFS using lzop compression format and reports NullPointerException
[target tracking] pedestrian attitude recognition based on frame difference method combined with Kalman filter, with matlab code
Installation and use of NVM
Latest investigation and progress of building intelligence based on sati
Matlab analytic hierarchy process to quickly calculate the weight
【目标跟踪】基于帧差法结合卡尔曼滤波实现行人姿态识别附matlab代码
Numpy mathematical function & logical function