2 条题解

  • 1
    @ 2025-2-22 20:58:27
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a,b=1,c=1,d=1;
    	cin>>a;
    	while(c<=a)
    	{
    		b++;
    		c+=b;
    		d++;
    	}
    	cout<<d;
    	return 0;
    }
    
    • 0
      @ 2024-11-17 11:16:57

      #include<bits/stdc++.h> using namespace std; int n,m,s; int main() { cin>>m; do{ n++; s+=n; }while(s<=m); cout>>n; return 0;//仅供参考 }

      • 1

      信息

      ID
      72
      时间
      1000ms
      内存
      64MiB
      难度
      7
      标签
      递交数
      53
      已通过
      13
      上传者