結果

問題 No.9000 Hello World! (テスト用)
ユーザー くれちーくれちー
提出日時 2017-08-26 14:50:22
言語 C#(csc)
(csc 3.9.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 775 bytes
コンパイル時間 1,919 ms
コンパイル使用メモリ 98,704 KB
実行使用メモリ 26,624 KB
最終ジャッジ日時 2023-08-26 08:24:07
合計ジャッジ時間 12,980 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System.Diagnostics;
using System.IO;
using System.Threading;

class Program
{
    static void Main()
    {
        var process = new Process();
        process.StartInfo.UseShellExecute = false;

        process.StartInfo.FileName = "echo";
        process.StartInfo.Arguments = "Hello World!";
        process.StartInfo.RedirectStandardOutput = true;

        if (process.Start()) Thread.Sleep(2000);
        process.WaitForExit();

        var output = process.StandardOutput.ReadToEnd();
        File.WriteAllText("out", output);

        process.StartInfo.FileName = "cat";
        process.StartInfo.Arguments = "out";
        process.StartInfo.RedirectStandardOutput = false;

        if (process.Start()) Thread.Sleep(1000);
        process.WaitForExit();
    }
}
0