当前位置:网站首页>String (Analog
String (Analog
2022-07-02 11:11:00 【lcxdz】
#include<bits/stdc++.h>
using namespace std;
long long ans=0;
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++){
string s=to_string(i);
ans+=s.size();
cout<<i<<" "<<s.size()<<endl;
}
cout<<ans<<endl;
return 0;
}
边栏推荐
- 华为游戏初始化init失败,返回错误码907135000
- Special topic of binary tree -- acwing 47 Path with a certain value in binary tree (preorder traversal)
- Oracle 笔记
- [play with FPGA learning 4 in simple terms ----- talk about state machine design]
- Primary key policy problem
- 2022-06-17
- Leetcode 182 Find duplicate email (2022.07.01)
- I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
- TIPC Getting Started6
- Special topic of binary tree -- acwing 18 Rebuild the binary tree (construct the binary tree by traversing the front and middle order)
猜你喜欢
How to implement tabbar title bar with list component
Hdu1236 ranking (structure Sorting)
金山云——2023届暑期实习
One trick to quickly realize custom application titlebar
III Chip startup and clock system
二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作
MTK full dump抓取
Special topic of binary tree -- Logu p1229 traversal problem (the number of traversals in the middle order is calculated when the pre and post order traversals of the multiplication principle are know
二叉树专题--AcWing 3384. 二叉树遍历(已知先序遍历 边建树 边输出中序遍历)
Implement custom drawer component in quick application
随机推荐
Shell programming 01_ Shell foundation
JSP webshell free -- the basis of JSP
QT学习日记8——资源文件添加
二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)
【深入浅出玩转FPGA学习3-----基本语法】
Creation and use of unified links in Huawei applinking
MySQL keyword
I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
How does the whole network display IP ownership?
Overview of integrated learning
【深入浅出玩转FPGA学习5-----复位设计】
力扣(LeetCode)182. 查找重复的电子邮箱(2022.07.01)
金山云——2023届暑期实习
三.芯片启动和时钟系统
Special topic of binary tree -- acwing 1589 Building binary search tree
Binary tree topic -- p1030 [noip2001 popularization group] find the first order
One trick to quickly realize custom application titlebar
PCL point cloud to depth image
TIPC Cluster5
JVM garbage collector