Submission

Status:

[P][P][P][P][P][P][P][PP][PP][PP]

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: anonymous

Problemset: แปลงดอกไม้

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-21 15:49:48

#include <bits/stdc++.h>
using namespace std;

int main(){
    int l,n; cin >> l >> n;
    int idx = l,sum = 0,ans = 0;

    while(sum < n){
        sum += (idx *(idx+1)/2) - ((idx - l) * (idx - l + 1) / 2);
        idx += l;
        ans++;
    }

    cout << ans;
}