Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
109885 揭伟琦 我家的门牌号 C++ Accepted 15 MS 268 KB 268 2025-02-13 11:07:10

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n,a=0,b,c; cin >>n; for(int i=1;i<n;i++){ a++; c=0; b=0; for(int i=1;i<n;i++){ b++; c=c+b; if(c-a*2==n){ cout <<a<<" "<<b; return 0; } } } return 0; }