
下面是我的代码,我觉得没什么问题,但是输出始终是2207030,答案是4430091,deepseek也没查出来问题(而且认为答案是4430093)。。。。求助万能的吧u

#include <bits/stdc++.h>using namespace std;int main(){ int thefront; int theback; int tf; int tb; int t=0; for(int i=1;i<=100000000;i++){ if(i%2==0){ if(i>=10 && i<=99){ thefront=i/10; theback=i%10; if(thefront==theback){ t++; } } else if(i>=1000 && i<=9999){ thefront=i/100; theback=i%100; tf=(thefront/10)+(thefront%10); tb=(theback/10)+(theback%10); if(tf==tb){ t++; } } else if(i>=100000 && i<=999999){ thefront=i/1000; theback=i%1000; tf=(thefront/100)+(thefront%100)/10+thefront%10; tb=(theback/100)+(theback%100)/10+theback%10; if(tf==tb){ t++; } } else if(i>=10000000 && i<=99999999){ thefront=i/10000; theback=i%10000; tf=(thefront/1000)+(thefront%1000)/100+(thefront%100)/10+thefront%10; tb=(theback/1000)+(theback%1000)/100+(theback%100)/10+theback%10; if(tf==tb){ t++; } } } } cout<<t<<endl; return 0;}