九度oj1051
来源:互联网 发布:郎咸平 离婚 知乎 编辑:程序博客网 时间:2024/04/30 11:22
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
int main(int argc, char* argv[])
{
int b[200];
int i,k,j,mul;
int remind;
int a,n;
while(scanf("%d %d",&a,&n) != EOF)
{
remind = 0;
k = 0;
for(i=n;i>=1;i--)
{
mul = a*i + remind;
b[k++] = mul % 10;
remind = mul / 10;
}
while(remind > 0)
{
b[k++] = remind % 10;
remind /= 10;
}
for(j=k-1;j>=0;j--)
printf("%d",b[j]);
printf("\n");
}
return 0;
}
- 九度oj1051
- 九度OJ1051
- 九度oj1051数字阶梯求和
- 【杭电oj1051】Wooden Sticks
- 【九度OJ】:九度OJ 1050
- 【九度OJ】:九度OJ 1053
- 【九度OJ】:九度OJ 1056
- 【九度OJ】:九度OJ 1059
- 【九度OJ】:九度OJ 1206
- 人生九度
- 九度oj1181
- 九度oj1207
- 九度oj1182
- 九度o j1026
- 九度oj1186
- 九度oj1074
- 九度oj1127
- 九度oj1197
- Linux下tcp并发服务器的几种设计的模式套路
- 我是如何学习NodeJs
- UVA 321 - The New Villa BFS+位运算
- 《结网》读书笔记
- UVA 11218 - KTV
- 九度oj1051
- 数据库学习之一 - 基本概念
- Android中notifyDataSetInvalidated()和notifyDataSetChanged()有什么区别
- POJ 2240 Arbitrage
- SoLoMo 随笔
- Sicily 1782 Knapsack
- <转>博弈相关
- Sicily 1825 Nickname
- java学习起步