4 条题解
-
0陈冕 (Chenman) LV 7 @ 2023-10-15 16:11:10
#include <queue> #include <math.h> #include <cmath> #include <stack> #include <stdio.h> #include <iostream> #include <vector> #include <iomanip> #include <string.h> #include <algorithm> #include <cstring> #include <bits/stdc++.h> #include <limits> using namespace std; long long n,wu; int main(){ cin>>n; for(long long i=5;i<=n;i*=5){ wu+=n/i; } cout<<wu; return 0; }
-
-12024-8-8 20:59:38@
#include<bits/stdc++.h> #define int long long using namespace std; int n,sum; signed main(){ cin>>n; while(n!=0){ n=n/5; sum=sum+n; } cout<<sum; }
-
-12024-6-14 19:13:48@
#include<iostream> #include<sstream> #include<iomanip> #include<stdio.h> #include<math.h> #include<string> #include<string.h> using namespace std; int main(){ long long n,sum=0; cin>>n; while(n!=0){ sum+=n/5; n/=5; } cout<<sum; return 0; }
-
-12023-2-14 20:56:04@
简单奥数,求其中因数5的个数就行(2*5=10,但2的数量一定比5多)
#include<iostream> #include<sstream> #include<iomanip> #include<stdio.h> #include<math.h> #include<string> #include<string.h> using namespace std; int main(){ long long n,sum=0; cin>>n; while(n!=0){ sum+=n/5; n/=5; } cout<<sum; return 0; }
- 1
信息
- ID
- 991
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 5
- 标签
- 递交数
- 229
- 已通过
- 89
- 上传者