![在这里插入图片描述](https://img-blog.csdnimg.cn/f7252431ff604407a9f7e937c9624958.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAU3RhcnQgTm93IEJhYnk=,size_20,color_FFFFFF,t_70,g_se,x_16)
#include<bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans = N;
int temp = 0;
while (N != 0) {
temp = temp * 10 + N % 10;
N /= 10;
}
if (ans > 0)
cout << temp << endl;
else if (ans == 0)
cout << "0" << endl;
else
cout<< temp << endl;
system("pause");
return 0;
}
![在这里插入图片描述](https://img-blog.csdnimg.cn/d9d41ec041254a4f932a898162ae13f4.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAU3RhcnQgTm93IEJhYnk=,size_20,color_FFFFFF,t_70,g_se,x_16)
#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
double ans = 0;
double temp1 = (1 + sqrt(5)) / 2;
double temp2 = (1 - sqrt(5)) / 2;
cin >> n;
ans = (1 / sqrt(5))*(pow(temp1,n)-pow(temp2,n));
cout << fixed<<setprecision(2)<<ans << endl;
system("pause");
return 0;
}
![在这里插入图片描述](https://img-blog.csdnimg.cn/6f605effb7b4432a8345ecc39fc2b546.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAU3RhcnQgTm93IEJhYnk=,size_20,color_FFFFFF,t_70,g_se,x_16)
#include<bits/stdc++.h>
using namespace std;
int main() {
int M, N;
cin >> M >> N;
int temp = 0;
int arry[10] = { 0 };
for (int i = M; i <= N; i++) {
temp = i;
while (temp) {
arry[temp % 10]++;
temp /= 10;
}
}
for (int i = 0; i < 10; i++) {
cout << arry[i]<<" ";
}
cout << endl;
system("pause");
return 0;
}