Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
109898 | 程余天皓 | 我家的门牌号 | C++ | Accepted | 1 MS | 272 KB | 216 | 2025-02-13 11:34:04 |
#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; }