私信TA
用户名:dotcpp0653421
访问量:1986
签 名:
自我简介:
厉害的人
作者: WYC0922 发表时间:2023-07-14 17:31:29 浏览:51 | 评论:0
参考代码:
#include <bits/stdc++.h>
using namespace std;
int main()
{
int sum=0,a=0 ;
int n ;
cin>>n ;
for(int i=1;;i++)
for(int j=1;j<=i;j++)
a++ ;
sum+=i ;
if(a==n)
cout<<sum ;
return 0 ;
}
0.0分
2 人评分
看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:
编程语言转换
万能编程问答
代码解释器
代码纠错
SQL生成与解释