Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6023 | 翟** | 判断质数(使用while循环) | C++ | Wrong Answer | 0 MS | 252 KB | 447 | 2024-12-28 09:49:51 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int h1,h2,i; cin>>h1>>h2; if(h1>h2) i=h2; else i=h1; while(i>=1){ if(h1%i==0&&h2%i==0) break; i--; } cout<<i<<endl; return 0; }
------Input------
560
------Answer-----
No
------Your output-----
0