Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
4982 | 先明缜 | 05求百位数的每一位数之和 | C++ | Accepted | 0 MS | 272 KB | 392 | 2024-10-19 20:18:31 |
#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 d; cin>>d; int a=d%10; int b=(d/10)%10; int c=d/100; cout<<a+b+c<<endl; return 0; }