結果

問題 No.2925 2-Letter Shiritori
ユーザー viral8
提出日時 2024-10-15 21:57:37
言語 Java
(openjdk 23)
結果
AC  
実行時間 252 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 2,922 ms
コンパイル使用メモリ 76,632 KB
実行使用メモリ 71,588 KB
平均クエリ数 26.00
最終ジャッジ日時 2024-10-15 21:57:45
合計ジャッジ時間 7,444 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		char alpha = sc.next().charAt(0);
		System.out.println("? "+alpha+alpha);
		String returnType = sc.next();
		while(returnType.equals("?")){
			char c = sc.next().charAt(1);
			System.out.println("? "+c+alpha);
			returnType = sc.next();
		}
	}
}
0