제출 #1367455

#제출 시각아이디문제언어결과실행 시간메모리
1367455kmath628Split (info1cup19_split)C++20
100 / 100
0 ms344 KiB
#include <bits/stdc++.h>
char s[20];
int main(){
    scanf(" %s",s);
    int n=strlen(s),i;
    for(i=n-1;i>=n/2;i--) s[i+1]=s[i];
    s[n/2]=' ';
    printf("%s\n",s);
    return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

split.cpp: In function 'int main()':
split.cpp:4:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    4 |     scanf(" %s",s);
      |     ~~~~~^~~~~~~~~
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…