結果

問題 No.331 CodeRunnerでやれ
ユーザー uwiuwi
提出日時 2015-12-16 04:53:45
言語 Java
(openjdk 23)
結果
AC  
実行時間 4,897 ms / 5,000 ms
コード長 981 bytes
コンパイル時間 3,755 ms
コンパイル使用メモリ 78,584 KB
実行使用メモリ 87,680 KB
平均クエリ数 1207.59
最終ジャッジ日時 2024-07-16 22:03:13
合計ジャッジ時間 18,430 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

package writer;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

public class RandomCrawler {
	static Scanner in;
	static PrintWriter out;
	static String INPUT = "";
	
	static void solve()
	{
		Random gen = new Random();
		while(true){
			char command = "FBLR".charAt(gen.nextInt(4));
			out.println(command);
			out.flush();
			String input = in.next();
			if(input.charAt(0) >= '0' && input.charAt(0) <= '9'){
			}else{
				break;
			}
		}
	}
	
	public static void main(String[] args) throws Exception
	{
		in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);
		
		solve();
		out.flush();
	}
	
	static int ni() { return Integer.parseInt(in.next()); }
	static long nl() { return Long.parseLong(in.next()); }
	static double nd() { return Double.parseDouble(in.next()); }
	static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); }
}
0