結果

問題 No.494 yukicoder
ユーザー bellbell
提出日時 2021-02-18 17:07:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 3,421 ms
コンパイル使用メモリ 71,304 KB
実行使用メモリ 55,824 KB
最終ジャッジ日時 2023-10-13 00:54:06
合計ジャッジ時間 5,079 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,820 KB
testcase_01 AC 120 ms
55,824 KB
testcase_02 AC 119 ms
55,592 KB
testcase_03 AC 118 ms
55,416 KB
testcase_04 AC 119 ms
55,452 KB
testcase_05 AC 118 ms
55,388 KB
testcase_06 AC 120 ms
55,676 KB
testcase_07 AC 119 ms
55,704 KB
testcase_08 AC 119 ms
55,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		String y="yukicoder";
		int count=0;
		char ans=0;
		for(int i=0; i<s.length(); i++){
			char c=s.charAt(i);
			if(c != y.charAt(i)) {
				count=s.indexOf("?");
				ans=y.charAt(count);
			}
		}
			System.out.println(ans);
			sc.close();
		}

	}
0