| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 79197 | 张黄源 | 回文数 | C++ | Wrong Answer | 1 MS | 272 KB | 363 | 2024-06-30 15:10:08 |
#include<iostream> using namespace std; int main(){ int a,x=10,d=99,w=1,ds,da,s=10,wq=90; cin>>a; while(a > 0){ if(a >= x&&a <= d){ ds = a/w%10; da = a/s%10; w = w*10; s = s/10; if(ds!=da){ cout<<"NO"; return 0; } }else{ x = x*10; d = d*10+9; s = s*10; } a/=10; } cout<<"YES"; return 0; }
------Input------
788
------Answer-----
NO
------Your output-----
YES