結果

問題 No.3012 Catch C code
ユーザー tubo28tubo28
提出日時 2015-08-31 00:51:02
言語 Text
(cat 8.3)
結果
WA  
実行時間 -
コード長 468 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 5,220 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-25 20:01:29
合計ジャッジ時間 1,133 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <string>
#include <cassert>

using namespace std;

signed main(){
    FILE * fp = fopen("./catch.o","r");
    //assert(fp != nullptr);
    string s;
    char c;
    while((c = getc(fp)) != EOF) s += c;
    auto pos = s.find("FLAG");
    //assert(pos != string::npos);
    //dump(pos);
    string flag;
    while(pos < s.size() && isprint(s[pos])){
        flag += s[pos];
        pos++;
    }
    cout << flag << endl;
}
0