Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
109899 | 孙睿阳 | 我家的门牌号 | C++ | Accepted | 1 MS | 272 KB | 220 | 2025-02-13 11:35:07 |
#include<bits/stdc++.h> using namespace std; int main() { int n; 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; }