摘要:
做了好久,递归拆吧 #include<iostream>#include<cstdio>#include<cmath>using namespace std;int fun(int);int main(){ int n; cin>>n; fun(n);}int fun(int x){ int i; 阅读全文
posted @ 2019-02-19 23:27
晔子
阅读(207)
评论(0)
推荐(0)
摘要:
不会二分就暴力计算 提示:记方程f(x)=0f(x)=0,若存在22个数x_1x1和x_2x2,且x_1<x_2x1<x2,f(x_1) \times f(x_2)<0f(x1)×f(x2)<0,则在(x_1,x_2)(x1,x2)之间一定有一个根。 #include<iostrea 阅读全文
posted @ 2019-02-19 23:19
晔子
阅读(289)
评论(0)
推荐(0)
摘要:
把项链当做字符串输进去,可以用gets #include<iostream>#include<cstdio>#include<cmath>#include<cstring>using namespace std;char a[100000];int fj(int);int main(){ gets( 阅读全文
posted @ 2019-02-19 23:12
晔子
阅读(140)
评论(0)
推荐(0)
摘要:
一定要认真审题 “去掉其中任意k个数字后剩下的数字按原左右次序将组成一个新的正整数” 也就是说 输入:7893400 4 输出:300 (00在原顺序中位于3后边) 输入:7890034 4 输出:3 (003的00不会输出) 把要修改的数字当做字符串输入,就可以把每一位数保存在数组里了 若各位数字 阅读全文
posted @ 2019-02-19 22:59
晔子
阅读(466)
评论(0)
推荐(0)