結果
| 問題 | No.739 大事なことなので2度言います |
| コンテスト | |
| ユーザー |
Kakisuke
|
| 提出日時 | 2018-12-29 19:17:59 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 411 bytes |
| コンパイル時間 | 313 ms |
| コンパイル使用メモリ | 19,968 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-01 21:09:29 |
| 合計ジャッジ時間 | 943 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 4 WA * 3 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%s",s);
| ^~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main()
{
char s[50],ans[100];
int i,count=0;
scanf("%s",s);
sprintf(ans,"%s%s",s,s);
for(i=0;;i++){
if(s[i]==ans[i]){
count=1;
}else{
count=0;
break;
}
}
switch(count){
case 1:
printf("YES\n");
break;
case 0:
printf("NO\n");
break;
}
return 0;
}
Kakisuke