Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
109897 | 王馨桐 | 我家的门牌号 | C++ | Accepted | 1 MS | 272 KB | 224 | 2025-02-13 11:33:11 |
#include<bits/stdc++.h> using namespace std; int n; int main(){ cin >>n; for(int x=1; ; x++){ for(int y=1; y<=x; y++){ if((1+x)*x/2-2*y==n){ cout <<y<<" "<<x; return 0; } } } return 0; }