Submission #869784

#TimeUsernameProblemLanguageResultExecution timeMemory
869784rainboySplit (info1cup19_split)C11
100 / 100
0 ms600 KiB
#include <stdio.h> #include <string.h> #define N 20 int main() { static char cc[N + 1], cc_[N + 2]; int n; scanf("%s", cc), n = strlen(cc); memcpy(cc_, cc, (n / 2) * sizeof *cc); cc_[n / 2] = ' '; memcpy(cc_ + n / 2 + 1, cc + n / 2, (n / 2) * sizeof *cc); printf("%s\n", cc_); return 0; }

Compilation message (stderr)

split.c: In function 'main':
split.c:10:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |  scanf("%s", cc), n = strlen(cc);
      |  ^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...