UVA10719- Quotient Polynomial
来源:互联网 发布:软件测试基础考题 编辑:程序博客网 时间:2024/06/14 01:34
思路:还是推公式,可以得到a[i + 1] -= b[i] * (-k);
#include<stdio.h> #include<string.h>#include<stdlib.h>int main() {int k = 0, r;int a[10005], b[10005];while (scanf("%d", &k) != EOF) {int cnt = 0;char ch;memset(a, 0, sizeof(a));memset(b, 0, sizeof(b));while (1) {scanf("%d%c", &a[cnt++], &ch);if (ch == '\n')break;}for(int i = 0; i < cnt - 1; i++){b[i] = a[i];a[i + 1] -= b[i] * (-k);}printf("q(x):");for(int i = 0; i < cnt - 1; i++)printf(" %d", b[i]);printf("\nr = %d\n\n", a[cnt - 1]);}return 0;}
- UVA10719- Quotient Polynomial
- UVA10719 Quotient Polynomial
- Quotient Polynomial
- Quotient Polynomial
- Quotient Polynomial
- Quotient Polynomial
- Quotient Polynomial
- uva 10719 Quotient Polynomial
- uva 10719 - Quotient Polynomial
- 10719 - Quotient Polynomial
- UVa 10719 - Quotient Polynomial
- 10719 - Quotient Polynomial
- Uva 10719 - Quotient Polynomial
- UVa 10719 - Quotient Polynomial
- 10719 - Quotient Polynomial
- UVA 10719 Quotient Polynomial
- uva 10719 Quotient Polynomial
- UVa 10719 Quotient Polynomial
- 新浪微博Oauth2.0授权 获取Access Token
- C++中的构造函数,拷贝构造函数和赋值运算
- Maya: 菜单 编辑网格 >折痕工具
- uva 993 Product of digits
- 每天一段小代码——链队列
- UVA10719- Quotient Polynomial
- Maya: 菜单 编辑网格 >移除选定对象
- hdu1358(KMP+最小循环节)
- Maya: 菜单 编辑网格 >移除全部
- Maya: 菜单 编辑网格 >折痕集
- UVA10916- Factstone Benchmark
- Hibernate懒加载深入分析
- 关于考研的一些复习视屏
- Maya: 菜单 编辑网格 >指定不可见面