Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
129683 杨涵雅 级数求和 C++ Wrong Answer 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; }


Judgement Protocol: