Free Contest 139 - CUBE
Xem dạng PDF
Gửi bài giải
Điểm:
0,70 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
512M
Dạng bài
Ngôn ngữ cho phép
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch
Bình luận
include <bits/stdc++.h>
using namespace std;
int main() { iosbase::syncwith_stdio(false); cin.tie(NULL); long long a,dd=0,sum=0; cin>>a; for(long long i=1;sum<=a;i++){ sum+=i*(i+1)/2; dd++; } cout<<dd-1; return 0; }
🐧
include <bits/stdc++.h>
using namespace std;
int main(){ iosbase::syncwith_stdio(0); cin.tie(0);cout.tie(0); long long x; cin>>x; long long d=1; for(long long i=2;i<=x;i++){ long long t=ii; while(t<=x){ d=max(d,t); if(t>x/i) break; t=i; } }
}