#include<bits/stdc++.h> int main() { int t, a[5]; long int k, i; for(i = 95860; ; i++) { for(t = 0, k = 100000; k >= 10; t ++) { a[t] = (i % k) / (k / 10); k /= 10; } if((a[0] == a[4]) && (a[1] == a[3])) { printf("%d%d%d%d%d\n", a[0], a[1], a[2], a[3], a[4]); printf("%.2f\n", (i - 95859) / 2.0); break; } } }标签:10,int,d%,++,5.22,printf From: https://www.cnblogs.com/dmx-03/p/17421990.html