PAT b1010题解
来源:互联网 发布:java web接口开发 编辑:程序博客网 时间:2024/05/28 03:03
#include <cstdio>int main(){int a[1010] = {0};int k, e, count = 0;while(scanf("%d%d", &k, &e) != EOF){a[e] = k;}a[0] = 0;for(int i = 1; i <= 1000; i++){a[i - 1] = a[i] * i;a[i] = 0;if(a[i - 1] != 0) count++;}if(count == 0) printf("0 0");else{for(int i = 1000; i >= 0; i--){if(a[i] != 0){printf("%d %d", a[i], i);count--;if(count != 0) printf(" ");}}} return 0;}
阅读全文
1 0
- PAT b1010题解
- [PAT] B1010
- PAT B1010
- 浙大 PAT b1010
- PAT B1010.一元多项式求导
- PAT B1010. 一元多项式求导
- B1010
- PAT乙级练习题B1010. 一元多项式求导
- PAT B1010. 一元多项式求导 (25)
- PAT 1001-1010 题解
- PAT 1011-1020 题解
- PAT 1021-1030 题解
- PAT 1031-1040 题解
- PAT 1041-1050 题解
- PAT 1051-1060 题解
- PAT(basic level)题解
- PAT乙级题解
- PAT题解目录
- UVA253 Cube Painting
- I2C读写和死锁
- Java8新特性--方法引用
- 端口分类
- 财务报表版本在开发报表中的应用
- PAT b1010题解
- Long Common Prefix
- LTE学习笔记--PHY--扫频
- MongoDB的基本使用
- Android面试题整理-1
- 简单的理解android四大组件
- 第一篇:初识Python
- hdu 1028 Ignatius and the Princess III (整数拆分)
- PAT b1011-b1015题解