結果

問題 No.2925 2-Letter Shiritori
ユーザー ks2m
提出日時 2024-10-14 16:24:22
言語 Java
(openjdk 23)
結果
AC  
実行時間 257 ms / 2,000 ms
コード長 387 bytes
コンパイル時間 2,429 ms
コンパイル使用メモリ 76,372 KB
実行使用メモリ 59,692 KB
平均クエリ数 26.00
最終ジャッジ日時 2024-10-14 16:24:29
合計ジャッジ時間 6,872 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();

		System.out.println("? " + s + s);
		while (true) {
			String s0 = sc.next();
			String s1 = sc.next();
			if (s0.equals("!")) {
				break;
			}
			System.out.println("? " + s1.charAt(1) + s);
		}
		sc.close();
	}
}
0