Error[8]: Undefined offset: 25, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 114
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

本来觉得应该还挺简单的一道题,结果因为对string的库函数不熟悉还有思维的不够严谨,debug了一个小时,写出来之后我直接哈哈哈。还是脑力和技术跟不上╮(╯▽╰)╭

题目描述:

代码实现:

class Solution {
public:
    string countAndSay(int n) {
        string str = "1";
        string res="";
        if(n == 1){
            return str;
        }
        int i = 1,count = 1;
        while(n > 1){
            res ="";
            for(i = 0;i

hhhh 顺便贴一个官方耍宝的打表 hhh

 

<===>)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
外观数列的c++实现_C_内存溢出

外观数列的c++实现

外观数列的c++实现,第1张

本来觉得应该还挺简单的一道题,结果因为对string的库函数不熟悉还有思维的不够严谨,debug了一个小时,写出来之后我直接哈哈哈。还是脑力和技术跟不上╮(╯▽╰)╭

题目描述:

代码实现:

class Solution {
public:
    string countAndSay(int n) {
        string str = "1";
        string res="";
        if(n == 1){
            return str;
        }
        int i = 1,count = 1;
        while(n > 1){
            res ="";
            for(i = 0;i

hhhh 顺便贴一个官方耍宝的打表 hhh

 

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/langs/920963.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-16
下一篇 2022-05-16

发表评论

登录后才能评论

评论列表(0条)