Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
72518 sh25_wangsj 整数去重 C++ 通过 0 MS 256 KB 557 2025-11-01 15:59:34

Tests(1/1):


#include <iostream> using namespace std; int main() { int a,x,j; cin>>a; int arr[666]; bool out=true; for (int i = 0; i < a; i++) { cin >> x; arr[i]=x; } for (int i = 0; i <a; i++) { j=i-1; out=true; while(j>=0){ if(arr[i]==arr[j]){ out=false; } j=j-1; } if(out==true){ cout<<arr[i]<<" "; } } return 0; }


测评信息: