結果

問題 No.739 大事なことなので2度言います
ユーザー greentea011
提出日時 2018-10-09 13:23:38
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 209 bytes
コンパイル時間 994 ms
コンパイル使用メモリ 21,888 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 16:27:14
合計ジャッジ時間 1,178 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 6 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |     scanf("%s", s);
      |     ~~~~~^~~~~~~~~

ソースコード

diff #

#include <stdio.h>
#include <string.h>

int main() {
    char s[21];
    scanf("%s", s);

    int len=strlen(s)/2;
    if (strncmp(s, &s[len],len)==0) printf("YES\n");
    else printf("NO\n");
    return 0;
}
0