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

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

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

    #include <bits/stdc++.h> using namespace std; int k; int j=1; int coin=0; int main(){ cin>>k; while(k>0){ for(int i=1;i<=j;i++){ if(k==0){ break; } k--; coin+=j; } j++; } cout<<coin; return 0; }

    userId_undefined

    只莹

    倔强青铜
    0阅读
    0回复
    0点赞
  • 太简单啦

    #include<bits/stdc++.h> using namespace std; int main(){ int n=1,k,ans=0; cin>>k; while(k>0){ for(int i=1;i<=n;i++){ if(k==0){ break; } k--; ans+=n; } n++; } cout<<ans; return 0; }

    userId_undefined

    185****1907

    倔强青铜
    0阅读
    0回复
    0点赞
  • see this

    #include<bits/stdc++.h> using namespace std; int main(){ int k,sum=0,cnt=0; cin>>k; for(int i=1;i<=k;i++) { for(int j=1;j<=i;j++) { sum+=i; cnt++; if(cnt>=k) { cout<<sum; return 0; } } } }

    userId_undefined

    gorx

    倔强青铜
    0阅读
    0回复
    0点赞
  • 第三十个题解

    userId_undefined

    疯猿丸爷ด้้้้้็้้้

    倔强青铜
    0阅读
    0回复
    0点赞
  • 题解

    userId_undefined

    正在减肥的吃货

    倔强青铜
    0阅读
    0回复
    0点赞
  • ...

    #include<iostream> using namespace std; int main(){ int md = 1; int d = 0; cin >> d; int m = 0; int d2 = 0; for(int i = 1;i <= d;i++){ m += md; d2++; if(d2 == md) d2 = 0,md++; } cout << m; return 0; }

    userId_undefined

    DARK SPECTRE

    倔强青铜
    0阅读
    0回复
    0点赞
  • ( ̄︶ ̄)↗ 

    #include<bits/stdc++.h> int a,b,c; using namespace std; int main(){ cin>>a; c=1; for(int i=1;i<=a;i++){ a=a-i; b=b+cc; c++; } cout<<b+ac; return 0; }

    userId_undefined

    风中雪zLyXj

    倔强青铜
    0阅读
    0回复
    0点赞

共87条

  • 1
  • 2
  • 3
  • 4
  • 5
20条/页
跳至页
首页