Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
107422 | 张誉腾 | 我家的门牌号 | C++ | Time Limit Exceeded | 1000 MS | 268 KB | 202 | 2025-01-17 17:03:43 |
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int m=1; ; m++) { for(int x=1; x<=m; x++) { if((1+m)*m/2-2*x==n) { cout<<x<<" "<<m; } } } }