Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
72756 邓昊源 我家的门牌号 C++ Accepted 0 MS 272 KB 267 2024-05-12 17:42:00

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int y = 1; int x = 1; while(5 > 0){ for(x = 1;x <= y; x++){ if((1+y)*y/2-2*x == n){ cout << x << " " << y; return 0 ; } } y++; } return 0; }