Submission

Status:

[PPPP-SSS]

Subtask/Task Score:

{0/100}

Score: 0

User: por

Problemset: สตริงซ้ำซ้ำ

Language: c

Time: 0.001 second

Submitted On: 2025-09-21 09:49:04

#include<stdio.h>
#include <string.h>
int main(){
    char x[20];
    char y[20];
    scanf("%s", &x);
    scanf("%s", &y);
    int cntsame=0;
    for(int i=0;i<strlen(x);i++){

        for(int j=0;j<strlen(y);j++){
            if(x[i]==y[j]){
                cntsame++;
            }
        }
     if(cntsame>0){
        printf("%c ", x[i]);
        cntsame=0;
     }
    }


}