/ SeriousOJ /

Record Detail

Compile Error

foo.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.

Code

#include <iostream>
#include <string>
using namespace std;

int main()
{
    int T;
    cin>>T;
    string S;


    for(int i=0; i<T; i++)
    {
        cin>>S;
        int totalValue =0;

        for (int j=0; j<S.length(); j++)
            {
                if(S[j]>= '0' && S[j]<='9')
                {
                    totalValue += (S[j]-'0');
                }
            }
            cout<< totalValue <<endl;
        }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1072 Valuable digit
Contest
Brain Booster #4
Language
C99 (GCC 13.2.0)
Submit At
2024-07-14 18:17:47
Judged At
2024-10-03 13:35:19
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes