| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 138933 | 令狐文丽 | 15几个数字组成 | C++ | Accepted | 0 MS | 272 KB | 843 | 2025-11-30 12:20:34 |
#include<bits/stdc++.h> using namespace std; int main(){ /** //for(起点;结束条件;过程){} //起点 //while(结束条件){过程} int sum=0,i=6; while(i<6){ sum+=i; i++; } cout<<sum;//0 int i=6; do{ sum+=i }while(i<6); } int i=0,s=0;//1 2 3 4 5 s=和 /** for(s=0,i=1;s<=1000;i++){ s+=i; } cout<<i; while(s<=15){ i++;//1 s+=i; } cout<<i; bool flag=true;//假设他为质数 int n,i=2; cin>>n; while(i<n){ if(n % i==0){ flag=false;//不是质数 } i++; } if(falg==true){ cout<<"Yes"; }else{ cout<<"No"; } int a,b; cin>>a>>b; int i =a; while(true){ if(a % i==0 and b % i==0){ cout<<i; return 0; } i--; }**/ int n,cn=0; cin>>n; while(n!=0) { n=n/10; cn++; } cout<<cn; return 0;//告诉计算程序结束 }