結果

問題 No.558 575検出するやつ
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-05-06 23:45:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 496 bytes
コンパイル時間 1,911 ms
コンパイル使用メモリ 71,064 KB
実行使用メモリ 56,144 KB
最終ジャッジ日時 2023-09-10 10:51:30
合計ジャッジ時間 5,603 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,804 KB
testcase_01 AC 119 ms
56,060 KB
testcase_02 AC 117 ms
56,016 KB
testcase_03 AC 119 ms
55,440 KB
testcase_04 AC 117 ms
56,012 KB
testcase_05 AC 119 ms
56,144 KB
testcase_06 AC 116 ms
55,720 KB
testcase_07 AC 117 ms
55,760 KB
testcase_08 AC 117 ms
55,588 KB
testcase_09 AC 117 ms
56,000 KB
testcase_10 AC 117 ms
55,496 KB
testcase_11 AC 117 ms
55,620 KB
testcase_12 AC 118 ms
56,104 KB
testcase_13 AC 117 ms
55,432 KB
testcase_14 AC 118 ms
55,628 KB
testcase_15 AC 119 ms
55,928 KB
testcase_16 AC 120 ms
55,904 KB
testcase_17 AC 118 ms
55,500 KB
testcase_18 AC 117 ms
55,724 KB
testcase_19 AC 116 ms
56,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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

        String ans = "NO";
        for(int i = 0; i < s.length() - 2; i++) {
            if(s.charAt(i) == '5')
                if(s.charAt(i+1) == '7')
                    if(s.charAt(i+2) == '5') {
                        ans = "YES";
                        break;
                    }
        }

        System.out.println(ans);
    }
}
0