1137: C语言训练-求函数值 摘要:解题思路:注意事项:使用sys改变递归深度,避免报错参考代码:import syssys.setrecursionlimit(1000000)def f(x): if x == 1: …… 题解列表 2024年01月09日 0 点赞 0 评论 90 浏览 评分:0.0
Hifipsysta-1137题-C语言训练-求函数值(C++代码)普通递归法 摘要:```cpp #include using namespace std; int func(int x){ int y=0; if(x==1){ y=1…… 题解列表 2022年01月30日 0 点赞 0 评论 144 浏览 评分:0.0
python训练-求函数值——递归函数 摘要:解题思路:仔细列出前几个数就会发现,后一个数总等于前一个数加2在列表里最后一个数用L[-1]注意事项:参考代码:n = int(input())L = [10]for i in range(n-1):…… 题解列表 2023年03月18日 0 点赞 0 评论 105 浏览 评分:0.0
C语言训练-求函数值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int fun(int x){ if(x==1) { return 10; } …… 题解列表 2023年01月05日 0 点赞 0 评论 128 浏览 评分:0.0
编写题解 1137: C语言训练-求函数值 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string.h>#include<ctype.h>#include<math.h>using namespace …… 题解列表 2022年03月21日 0 点赞 0 评论 164 浏览 评分:0.0
1137-求函数值(代码短,思路容易理解) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int fun(int n){ if(n==1) return 10; …… 题解列表 2022年10月08日 0 点赞 0 评论 114 浏览 评分:0.0
C语言训练-求函数值 (C语言代码)只能死板递归? 摘要:解题思路:虽然提交错误,但我也把代码贴出来;这里我处理了重叠子问题;提高了效率; 但是就是不通过。注意事项:参考代码:#include <cstdio> #include <cstring> #…… 题解列表 2018年11月07日 0 点赞 0 评论 421 浏览 评分:0.0
C语言训练-求函数值 (C语言代码) 摘要:解题思路:递归注意事项:参考代码:#include <stdio.h>int f(int n){ if(n==1)return 10; else return (f(n-1)+2);}in…… 题解列表 2017年09月23日 0 点赞 0 评论 786 浏览 评分:0.0
C语言训练-求函数值 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include <math.h>int f(x){ int y; if(x==1) …… 题解列表 2017年12月20日 0 点赞 0 评论 834 浏览 评分:0.0
WU-C语言训练-求函数值 (C语言代码) 摘要:参考代码:#include<stdio.h> int f(int x) { if(x==1) return 10; if(x>1) return f(x-1)+2; } i…… 题解列表 2017年12月28日 1 点赞 0 评论 1106 浏览 评分:0.0