Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
112170 王昕怡 05求百位数的每一位数之和 C++ Accepted 1 MS 280 KB 364 2025-03-08 16:07:25

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,q,w; cin>>a; q=a/100; w=a/10%10; a=a%10; cout<<a+q+w<<endl; return 0; }