結果

問題 No.739 大事なことなので2度言います
ユーザー Akihisa.K
提出日時 2018-11-03 17:00:14
言語 C
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 404 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 28,544 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-20 19:14:10
合計ジャッジ時間 996 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 4 RE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(void){
    int len,i=0;
    char in[20],rslt[4],half[20],tmp[20];

    fgets(in,sizeof(in),stdin);
    for(i=0;in[i]!='\n';i++){}
    strncpy(half,in,i/2);
    strcpy(tmp,half);
    strcat(tmp,half);
    len=strncmp(tmp,in,i);

    if(len==0){
        strcpy(rslt,"YES");
    }else{
        strcpy(rslt,"NO");
    }

    printf("%s\n",rslt);
    return 0;
}
0