提出 #18380699


ソースコード 拡げる

import sys


def IN_I(): return int(sys.stdin.readline().rstrip())
def IN_LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def IN_LF(): return list(map(float, sys.stdin.readline().rstrip().split()))

def IN_S(): return sys.stdin.readline().rstrip()
def IN_LS(): return list(sys.stdin.readline().rstrip().split())
INF = float('inf')
MOD = 10**9 + 7


N = IN_I()
S = IN_S()

T = ''

for i in range(N):
    T = T + S[i]
    if len(T) >= 3 and T[-3:] == 'fox':
        T = T[:-3]
print(len(T))

提出情報

提出日時
問題 B - Abbreviate Fox
ユーザ okayuki
言語 Python (3.8.2)
得点 400
コード長 529 Byte
結果 AC
実行時間 159 ms
メモリ 9684 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 400 / 400
結果
AC × 3
AC × 26
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, hand_02.txt, hand_03.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
hand_01.txt AC 18 ms 8920 KiB
hand_02.txt AC 21 ms 9092 KiB
hand_03.txt AC 159 ms 9376 KiB
random_01.txt AC 87 ms 9236 KiB
random_02.txt AC 89 ms 9256 KiB
random_03.txt AC 63 ms 9140 KiB
random_04.txt AC 112 ms 9548 KiB
random_05.txt AC 97 ms 9528 KiB
random_06.txt AC 102 ms 9344 KiB
random_07.txt AC 89 ms 9312 KiB
random_08.txt AC 21 ms 9104 KiB
random_09.txt AC 143 ms 9348 KiB
random_10.txt AC 136 ms 9604 KiB
random_11.txt AC 99 ms 9532 KiB
random_12.txt AC 39 ms 9144 KiB
random_13.txt AC 141 ms 9548 KiB
random_14.txt AC 29 ms 8976 KiB
random_15.txt AC 103 ms 9448 KiB
random_16.txt AC 25 ms 9156 KiB
random_17.txt AC 134 ms 9376 KiB
random_18.txt AC 21 ms 9244 KiB
random_19.txt AC 137 ms 9684 KiB
random_20.txt AC 43 ms 9248 KiB
sample_01.txt AC 18 ms 9072 KiB
sample_02.txt AC 20 ms 9084 KiB
sample_03.txt AC 23 ms 8920 KiB