acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • 给个赞

    #include<bits/stdc++.h> using namespace std; int n,a; int f(int x){ if(a==n){ return x; } a++; return f(x*2+1); } int main(){ cin>>n; cout<<f(2)-1; return 0; }

    userId_undefined

    姚凯诺

    循环·循环打卡人倔强青铜
    7阅读
    3回复
    2点赞
  • 题解

    userId_undefined

    zsy

    出道萌新7月全勤卷王时间刺客时空双修者题解仙人秩序白银
    40阅读
    0回复
    0点赞
  • tj

    userId_undefined

    bianhl

    贪心·贪心尝试者时间刺客空间掌握者题解仙人分治·分治练习生秩序白银
    14阅读
    0回复
    1点赞
  • 题解 100% AC

    userId_undefined

    飞的智动

    时空双修者题解仙人模拟·模拟练习生7月全勤卷王循环·循环打卡人倔强青铜
    5阅读
    0回复
    1点赞
  • 题解(可以用for不用递归)

    userId_undefined

    无敌的鳖佬仔给老爷爷ccb

    循环·循环打卡人时间刺客空间掌握者出道萌新I/O·IO入门者荣耀黄金
    9阅读
    0回复
    0点赞
  • 题解

    #include<bits/stdc++.h> using namespace std; int f(int n,int a){ if(a==0)return n; else return f((n+1)*2,a-1); } int main(){ int a; cin>>a; cout<<f(1,a); return 0; }

    userId_undefined

    赵承恺(互关)

    0阅读
    0回复
    0点赞
首页