Submission
Status:
[P][P][P][P][P][P][P][P][PP][P]
Subtask/Task Score:
{10/10}{10/10}{10/10}{10/10}{10/10}{10/10}{10/10}{10/10}{10/10}{10/10}
Score: 100
User: Tjeez
Problemset: กองส้ม
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-20 09:17:17
#include <iostream>
using namespace std;
int main(){
int l,n,a,c=0;
cin>>l>>n;
a=(l*(l+1)*(2*l+1))/6 - n;
while (a>0){
a-=l*l;
l-=1;
c+=1;
}
cout<<c;
}