2 条题解
-
1
周钰宸 (Corey_ZYC) LV 6 @ 2025-04-06 14:13:34
#include <bits/stdc++.h>
#define int long long
using namespace std;signed main()
{
ios::sync_with_stdio(false);
int n,count=0,i=0,t;
cin>>n;
if(!n)
{
cout<<1;
return 0;
}
while(count!=n)
{
i+=5;
t=i;
while(t%5==0)
{
count++;
t=t/5;
}
}
if(count==n)
{
cout<<i;
}
else
{
cout<<"No solution";
}
return 0;
} -
02024-04-27 11:26:47@
#include <bits/stdc++.h> #define int long long using namespace std; signed main() { ios::sync_with_stdio(false); int n,count=0,i=0,t; cin>>n; if(!n) { cout<<1; return 0; } while(count!=n) { i+=5; t=i; while(t%5==0) { count++; t=t/5; } } if(count==n) { cout<<i; } else { cout<<"No solution"; } return 0; }
- 1
信息
- ID
- 1009
- 难度
- 5
- 分类
- (无)
- 标签
- 递交数
- 90
- 已通过
- 33
- 通过率
- 37%
- 被复制
- 6
- 上传者