/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 0ms 320.0 KiB
#2 Wrong Answer 0ms 384.0 KiB
#3 Wrong Answer 0ms 316.0 KiB
#4 Wrong Answer 1ms 324.0 KiB

Code

#include <stdio.h>
#include <ctype.h>

int main() {
    int T;
    scanf("%d", &T);
    getchar();

    while (T--) {
        char S[1001];
        fgets(S, sizeof(S), stdin);

        int total = 0;


        for (int i = 0; S[i] != '\0'; i++) {
            if (isdigit(S[i])) {
                total+= S[i] - '0';
            }
        }

        printf("%d\n", total);

    return 0;
}

}

Information

Submit By
Type
Submission
Problem
P1072 Valuable digit
Contest
Brain Booster #4
Language
C11 (GCC 13.2.0)
Submit At
2024-07-14 16:10:03
Judged At
2024-10-03 13:38:19
Judged By
Score
0
Total Time
1ms
Peak Memory
384.0 KiB