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

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • #我是出题者 #正解

    n相当于等差数列求和。 (首项+尾项)*项数/2 所以只用这一句即可: cout<<int(sqrt(2*n))<<endl; 代码: #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; cout<<int(sqrt(2*n))<<endl; return 0; }

    userId_undefined

    177****4391

    倔强青铜
    0阅读
    0回复
    1点赞
首页