A problem about a code from last EDU round

Правка en2, от star_xingchen_c, 2020-12-01 06:47:34

This is a code from magician_man of 1455A - Strange Functions 100022199.

Notice that he used input[50] but not input[101].

I tried hack it but it did not get a RT.

How did it work?

#include<iostream>
#include<string>
#include<bits/stdc++.h>

using namespace std;

int main()
{
    int t,i;
    char input[50];
    cin >> t;
    for(i=1;i<=t;i++){
        cin >> input;
        cout << strlen(input) << endl;
    }
    return 0;
}

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский star_xingchen_c 2020-12-01 06:47:34 2
en1 Английский star_xingchen_c 2020-12-01 06:46:17 542 Initial revision (published)