当前位置:网站首页>Zzuli:1052 sum of sequence 4
Zzuli:1052 sum of sequence 4
2022-07-03 14:34:00 【Snake_____】
Title Description
Input n and a, seek a+aa+aaa+…aa…a(n individual a), As if n=3,a=2 when ,2+22+222 As the result of the 246
Input
Contains two integers ,n and a, The meaning is as above , You can assume that n and a All are less than 10 Non-negative integer
Output
Before output n Xiang He , Take a line alone
The sample input Copy
3 2
Sample output Copy
246
#include <stdio.h>
int main()
{
int n,a,i,x=0,sum=0;
scanf("%d%d",&n,&a);
for(i=1;i<=n;i++)
{
x=x+a;
sum=sum+x;
a=a*10;
}
printf("%d",sum);
return 0;
}边栏推荐
- 光猫超级账号密码、宽带账号密码 获取
- Solr series of full-text search engines - basic principles of full-text search
- Creation of data table of Doris' learning notes
- Timecho of Tianmou technology completed an angel round financing of nearly 100 million yuan to create a native timing database of the industrial Internet of things
- Selective sorting
- Raft agreement
- Four data flows and cases of grpc
- Find specified characters
- Facebook 如何将 Instagram 从 AWS 搬到自己的服务器
- ShowMeBug入驻腾讯会议,开启专业级技术面试时代
猜你喜欢

Accelerating strategy learning using parallel differentiable simulation

ConstraintLayout 的使用

必贝特医药冲刺科创板:年营收97万亏损1.37亿 拟募资20亿

Pyqt interface production (login + jump page)

puzzle(016.3)千丝万缕

MySQL multi table query subquery

tonybot 人形机器人 查看端口并对应端口 0701

Frequently asked questions: PHP LDAP_ add(): Add: Undefined attribute type in

论文分享:Generating Playful Palettes from Images

如何查询淘宝天猫的宝贝类目
随机推荐
Plane vector addition
添加Zabbix计算类型项目Calculated items
556. 下一个更大元素 III : 简单构造模拟题
一文了解微分段应用场景与实现机制
Stop asking yourself if you are suitable for software testing
Sendmail无法发送邮件及发送过慢解决
pyQt界面制作(登录+跳转页面)
FPGA blocking assignment and non blocking assignment
tonybot 人形机器人 查看端口并对应端口 0701
Common shortcut keys in PCB
Protobuf and grpc
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not
Tonybot humanoid robot checks the port and corresponds to port 0701
【北大青鸟昌平校区】互联网行业中,哪些岗位越老越吃香?
Timecho of Tianmou technology completed an angel round financing of nearly 100 million yuan to create a native timing database of the industrial Internet of things
Happy capital new dual currency fund nearly 4billion yuan completed its first account closing
Frequently asked questions: PHP LDAP_ add(): Add: Undefined attribute type in
Add ZABBIX calculation type itemcalculated items
光猫超级账号密码、宽带账号密码 获取