結果

問題 No.494 yukicoder
ユーザー bell
提出日時 2021-02-18 17:07:22
言語 Java
(openjdk 23)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 2,518 ms
コンパイル使用メモリ 74,768 KB
実行使用メモリ 41,460 KB
最終ジャッジ日時 2024-09-14 22:47:30
合計ジャッジ時間 4,277 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

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