Submission

Status:

-P--PPPPPP--PPPPP-P-

Subtask/Task Score:

65/100

Score: 65

User: Apimuk

Problemset: มุมขวาบน

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-23 22:46:04

#include <iostream>
#include <stack>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <iomanip>
#include <sstream>

using namespace std;

int main() {
	long long int n;
	cin >> n;
	int size = sqrt(n);
	if (size % 2 == 0) {
		size++;
	}
	int edge = size*size - (size - 1);
	if (n >= edge) {
		cout << edge;
	}
	else {
		cout << "NO";
	}
	
}