统计0的个数: #include<iostream> using namespace std; int main(){ while(true){ int N,M; cin>>N>>M; int test=1; for(int i=1;i<=N;i++){ test=test*i; } int result=0; cout<<test<<endl; while(test!=0){ if(test>=M&&test%M==0){ result++; } else{ break; } test=test/M; } cout<<result; } return 0; }
点赞 5

相关推荐

10-10 16:30
济宁学院 Java
一表renzha:面试官:蓝桥杯三等奖?你多去两次厕所都能拿二等吧
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务