結果

問題 No.700 LOVE
ユーザー hooooyaerthooooyaert
提出日時 2018-07-21 19:45:35
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 955 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 8,008 KB
最終ジャッジ日時 2023-09-30 05:29:01
合計ジャッジ時間 1,101 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,860 KB
testcase_01 AC 15 ms
7,788 KB
testcase_02 AC 15 ms
7,808 KB
testcase_03 AC 13 ms
7,784 KB
testcase_04 AC 13 ms
8,008 KB
testcase_05 AC 14 ms
7,856 KB
testcase_06 AC 14 ms
7,788 KB
testcase_07 AC 13 ms
7,868 KB
testcase_08 AC 13 ms
7,968 KB
testcase_09 AC 14 ms
7,856 KB
testcase_10 AC 13 ms
7,820 KB
testcase_11 AC 13 ms
7,788 KB
testcase_12 AC 12 ms
7,952 KB
testcase_13 AC 13 ms
7,900 KB
testcase_14 AC 12 ms
7,860 KB
testcase_15 AC 13 ms
7,968 KB
testcase_16 AC 12 ms
7,908 KB
testcase_17 AC 12 ms
7,788 KB
testcase_18 AC 13 ms
7,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def Decision(N):
    ro = N
    for i in range(ro):
        find = A[i].find('LOVE')    #.find('何かの文字列')は'何かの文字列'があったときの位置を番号で表示する.
        if find != -1:
            check = 'YES'
            break   #for文を途中でやめたいときはbreakをする.continueがその逆
    if find != -1:
        return check
    else:
        check = 'NO'
        return check

"""
#入力(textファイル)
num =0
A = []
matrix = []
with open('700_2.txt','r') as f:
    for line in f:
        num+=1
        if num==1:
            matrix=line.split() #A Bという2つの値が同じ行にある時,タプルとして格納する.
            row = int(matrix[0])
        else:
            A.append(str(line.strip()))
"""
#入力(手入力)
matrix = input().split()
A = []
for i in range(int(matrix[0])):
    A.append(input())
print(Decision(int(matrix[0])))
0