Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
129683 杨涵雅 级数求和 C++ 解答错误 0 0 MS 248 KB 251 2024-01-27 09:50:01

Tests(0/4):


#include<bits/stdc++.h> using namespace std; int ans = 0; int sym; int main() { int n; cin>>n; if(n < 0){ sym = -1; n=-n; } else{ sym = 1; } while(n != 0){ ans = ans * 10 + n % 10; n = n / 10; } cout << sym * ans; return 0; }


测评信息: