Submission

Status:

----PP------PPP-----

Subtask/Task Score:

25/100

Score: 25

User: samsenpisardmoo26

Problemset: มุมขวาบน

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-10 13:16:33

#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long n;
    cin >> n;
    long long k = 1;
    while(k*k < n)
    {
        k += 2;
    }
    if(k*k-k+1 <= n)
    {
        cout << k*k-k+1;
    }
    else
    {
        cout << "Cannot find top-right";
    }
    return 0;
}