Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
129517 胡德滔 级数求和 C++ 解答错误 0 0 MS 248 KB 255 2024-01-27 08:47:28

Tests(0/4):


#include<bits/stdc++.h> using namespace std; int main() { int ans = 0; int sym; 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; }


测评信息: