Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
107421 张誉腾 我家的门牌号 C++ Compile Error 0 MS 0 KB 196 2025-01-17 17:03:18

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:16: error: 'm' was not declared in this scope
  for(int i=1; ;m++){
                ^
Main.cc:8:10: warning: unused variable 'i' [-Wunused-variable]
  for(int i=1; ;m++){
          ^