Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
71167 sh25_wangsj 数字反转 C++ 解答错误 0 MS 252 KB 368 2025-10-24 15:29:37

Tests(1/3):


#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a; if(a>0){ while(a!=0){ b=a%10; a=(a-b)*1.0/10; cout<<b; } }else if(a<0){ c=0-a; cout<<"-"; while(c!=0){ b=c%10; c=(c-b)*1.0/10; cout<<b; } }else{ cout<<0; } return 0; }


测评信息: