文章

11

粉丝

407

获赞

1

访问

111.6k

头像
最长因子数
备考心情
发布于2020年5月1日 15:30
阅读数 10.7k

#include <bits/stdc++.h>
using namespace std;
int main(){
    int n,x;
    while(cin>>n){
        int count=0,max=0;
        int x;
        for(int i=2;i<=n;i++){//判断每一次的连续的因字数
            for(int j=i;j<=n;j++){
                if(n%j==0)
                    count++;
                else
                    break;
            }
            if(count>max){//比较每一次连续因字数,后面多的话重新赋值,不多就还是原来的
         &nbs...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发