Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
95158 程诺 05求百位数的每一位数之和 C++ Accepted 1 MS 272 KB 462 2024-10-27 09:02:14

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ /**cout<<17/3<<endl; cout<<18.0/4<<endl; cout<<-17/3<<endl; cout<<17%3<<endl; cout<<-17%4<<endl; cout<<4567%100; int a = 2,b = 3,c = 4; cout<<a*b+c<<endl; cout<<a*(b+c)<<endl; cout<<(1+b)*c<<endl; cout<<a*a*b*b; int N,M; cin>>N; cin>>M; cout<<(N+M)*2<<" "<<N*M; **/ int n,a,b,c; cin>>n; a = n%10; b = n/10%10; c = n/100; cout<<a+b+c; return 0; }