2 条题解

  • 0
    @ 2025-7-14 11:20:38
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int m,n=1,t=0;
    	cin>>m;
    	while(m>t)
    	{
    		t+=n;
    		n++;
    	}
    	cout<<n-1;
    	return 0;
    }
    快给下面的差评,反正你们不玩司马懿!
    
    • -1
      @ 2025-1-2 22:27:32

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

      差评者司马

      • @ 2025-7-14 11:20:00
        就差评
        (玩王者荣耀时)!
        玩司马懿 死19,杀2,助攻0;
        你开心了吧!
        
    • 1

    信息

    编号
    2326
    时间
    1000ms
    内存
    256MiB
    难度
    3
    标签
    递交数
    98
    已通过
    57
    上传者