結果
問題 |
No.8051 cracked
|
ユーザー |
![]() |
提出日時 | 2019-04-01 22:32:44 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 316 bytes |
コンパイル時間 | 269 ms |
コンパイル使用メモリ | 22,400 KB |
実行使用メモリ | 25,964 KB |
平均クエリ数 | 2.00 |
最終ジャッジ日時 | 2024-07-16 16:51:27 |
合計ジャッジ時間 | 4,568 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 24 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%s", std); | ~~~~~^~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ char ch; FILE *fp; char std[114514]; 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\"\"%c\"", index, ch, std[index]); break; } index = index + 1; } fclose(fp); return 0; }