Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
115090 | 刘佳宇 | 哪几扇门是打开的 | C++ | Accepted | 0 MS | 256 KB | 283 | 2025-03-29 11:01:39 |
#include<bits/stdc++.h> using namespace std; bool d[101]; int main(){ for(int i=1;i<=100;i++){//人号 for(int j=1;j<=100;j++){//门编号 if(j%i==0){ d[j]=!d[j];//相反处理 } } } for(int j=1;j<=100;j++){ if(d[j]){ cout<<j<<" "; } } return 0; }