Problem:
Score : 200 points

Problem Statement

Given is a string S. Replace every character in S with x and print the result.

Constraints

S is a string consisting of lowercase English letters.

The length of S is between 1 and 100 (inclusive).

Input

Input is given from Standard Input in the following format:

S

Output

Replace every character in S with x and print the result.

Sample Input 1

sardine

Sample Output 1

xxxxxxx

Replacing every character in S with x results in xxxxxxx.

Sample Input 2

xxxx

Sample Output 2

xxxx

Sample Input 3

gone

Sample Output 3

xxxx

Solution in C++14 (Clang 3.8.0) (judge verdict: Wrong Answer)

#include <iostream>
using namespace std;
int main() {

    int n,distressed=0;
    long long x;
    cin >>n >> x;
    int value[n];char sign;

    for(int i=0 ; i<n ; ++i){
        cin >> sign >>  value[i];
        if(sign =='+')
        x+= value[i];
        else if (sign =='-'){
            if(value[i]<=x){
                x-=value[i];}
            else 
                distressed +=1;}
    }cout << x <<" " <<distressed;

    return 0;}