| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 136036 | 丁俊杰 | 100至200之间的所有素数 | C++ | Wrong Answer | 2 MS | 260 KB | 375 | 2025-11-08 22:18:34 |
#include <iostream> // 里面有cin,cout等函数 #include<cmath> //里面有abs,sqrt,pow等函数 using namespace std; int main(){ for(int i=100;i<=200;i++) { int flag=0; //声明+赋初值 for(int j=2;j*j<=i;j++) //只需要到sqrt(i) { if(i%j==0) flag=1; break; } if(flag==0) cout<<i<<endl; } return 0; }
------Input------
0
------Answer-----
101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199
------Your output-----
101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175 177 179 181 183 185 187 189 191 193 195 197 199