1 solutions

  • 0
    @ 2025-12-2 15:35:38

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int n,s;
    int main(){
    	cin>>n;
    	while(n>0)
    	{
    		if(n%10%2==1)s+=n%10;
    		n/=10;
    	}
    	cout<<s;
        return 0;
    }
    
    • 1

    Information

    ID
    648
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    10
    Tags
    # Submissions
    2
    Accepted
    2
    Uploaded By