标签:
5
1
0
3121 1025
1 1
Source
AC代码:
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { long int n,d,c; while (cin>>n&&n) { c=n; d=pow(5,n)-4; cout<<setiosflags(ios::fixed)<<setprecision(0)<<pow(5,n)-4<<" "; while (n>0) d=d-(d-1)/5-1,n--; cout<<d+c<<'\n'; } return 0; }运行结果:
标签:
原文地址:http://blog.csdn.net/zp___waj/article/details/45827555