結果

問題 No.3012 Catch C code
ユーザー tubo28tubo28
提出日時 2015-08-31 00:49:59
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 431 bytes
コンパイル時間 402 ms
コンパイル使用メモリ 51,880 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-25 20:01:11
合計ジャッジ時間 1,157 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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");
    //dump(pos);
    string flag;
    while(pos < s.size() && isprint(s[pos])){
        flag += s[pos];
        pos++;
    }
    cout << flag << endl;
}
0