Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
67423 冯诚阳 狐狸吃兔子 C++ Accepted 0 MS 268 KB 354 2024-03-16 15:28:20

Tests(1/1):


Code:

#include<iostream> #include<cstring> #include<cmath> using namespace std; int main(){ int a[11]={}; for(int i=1,j=1;i<=1000;i++,j+=i){ if(j>10) j%=10; a[j]=1; } int i=1; while(a[i]) i++; cout<<i; for(i+=1;i<=10;i++){ if(!a[i]) cout<<" "<<i; } return 0; }