Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
331196 胡珂 【C5-3】数字和 C++ Wrong Answer 0 3 MS 252 KB 240 2025-07-11 16:39:14

Tests(0/1):


#include <bits/stdc++.h> using namespace std; string s; long long b=0; int main() { getline(cin,s); int l=s.size(); int a=s[l-1]-'0'; while(l>0) { int x=a%10; int y=a/10; b+=x; l--; } cout << b; return 0; }


Judgement Protocol: