結果

問題 No.8051 cracked
ユーザー keymoon
提出日時 2019-04-01 22:58:40
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 260 bytes
コンパイル時間 936 ms
コンパイル使用メモリ 19,840 KB
実行使用メモリ 25,616 KB
平均クエリ数 3.92
最終ジャッジ日時 2024-07-16 16:53:06
合計ジャッジ時間 4,477 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 24
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:2:43: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    2 | int main(){char ch;FILE *fp;char std[500];scanf("%s",std);fp = fopen("source.txt","r");int index;index=0;while(1){ch = fgetc(fp);if(ch != std[index]){printf("%d\n\"%c\"\n\"%c\"",index,ch,std[index]);break;}index=index+1;}fclose(fp);return 0;}
      |                                           ^~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
int main(){char ch;FILE *fp;char std[500];scanf("%s",std);fp = fopen("source.txt","r");int index;index=0;while(1){ch = fgetc(fp);if(ch != std[index]){printf("%d\n\"%c\"\n\"%c\"",index,ch,std[index]);break;}index=index+1;}fclose(fp);return 0;}
0