Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: mumumimi
Problemset: มุมขวาบน
Language: cpp
Time: 0.005 second
Submitted On: 2026-10-07 09:27:30
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;cin >> n;
int total =1;
int i=1;
while(true){
total=total+(8*i-2);
if(total-2==n){
cout << "Cannot find top-right corner.";
break;
}else if(total >n){
total = total-(8*i-2);
cout << total;
break;
}else if(total <n){
i++;
continue;
}
}
}