Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140194 万骏博 两个数的最小距离 C++ Wrong Answer 1 MS 280 KB 371 2025-12-13 16:52:33

Tests(8/15):


Code:

#include<bits/stdc++.h> using namespace std; long long o[1001],l=999999999,n,m; int main(){ scanf("%lld",&n); for(int i=1;i<=n;i++){ scanf("%lld",&o[i]); } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(i!=j){ m=abs(o[i]-o[j]); if(m<l){ l=m; } } } } printf("%lld",l); return 0; }


Run Info:

------Input------
2 -2147483648 2147483647
------Answer-----
4294967295
------Your output-----
999999999