Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
44153 | 王shizhao | 矩阵转置 | C++ | Wrong Answer | 0 MS | 248 KB | 382 | 2024-03-29 15:05:37 |
#include<bits/stdc++.h> using namespace std; int main(){ int p,l; cin>>p>>l; bool ls[5001]; for(int i=1;i<=p;i++){ ls[i]=0; } for(int i=1;i<=p;i+=2){ ls[i]=1; } for(int i=3;i<=l;i++){ for(int j=0;j<=l;j++){ if(j%i==0){ ls[j]=(!ls[j]); } } } cout<<"1"; for(int i=2;i<=l;i++){ if(ls[i]==1){ cout<<","<<i; } } return 0; }