結果

問題 No.331 CodeRunnerでやれ
コンテスト
ユーザー te-sh
提出日時 2017-07-19 15:11:43
言語 D
(dmd 2.112.0)
コンパイル:
dmd -fPIE -m64 -w -wi -O -release -inline -I/opt/dmd/src/druntime/import/ -I/opt/dmd/src/phobos -L-L/opt/dmd/linux/lib64/ -fPIC _filename_
実行:
./Main
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 481 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 432 ms
コンパイル使用メモリ 79,168 KB
実行使用メモリ 94,232 KB
平均クエリ数 272.18
最終ジャッジ日時 2026-03-05 16:31:22
合計ジャッジ時間 16,952 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 14 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import std.algorithm, std.conv, std.range, std.stdio, std.string;

void main()
{
  int r;

  auto rs = readln.chomp.to!int;
  foreach (i; 0..rs) r = ask("F");

  for (;;) {
    if (r == 0) {
      r = ask("R");
      continue;
    }

    ask("F");
    r = ask("L");
  }
}

int ask(string c)
{
  import core.stdc.stdlib;
  writeln(c); stdout.flush();
  auto s = readln.chomp;
  if (s == "Merry Christmas!") exit(0);
  auto r = s.to!int;
  if (r == 20151224) ask("F");
  return r;
}
0