[PYTHON] AtCoder ABC177

Summary

AC is only A problem. Immediately after the end, I was able to AC the B problem.

A - Don't be late I wrote it according to the problem. I remember the math class.

D,T,S = map(int,input().split())
if D / S <= T:
    print("Yes")
else:
    print("No")

B - Substring I was able to AC immediately after the end.

S = input()
T = input()
sl = len(S)
tl = len(T)
ans = tl
for i in range(sl - tl + 1):
    flag = 0
    tmp = 0
    for j in range(tl):
        if S[j + i] == T[j]:
            tmp += 1
    ans = min(ans,tl - tmp)

print(ans)

C - Sum of product of pairs I was able to AC by referring to the cumulative sum of the explanations.

N = int(input())
A = list(map(int,input().split()))
s = [0]
for i in range(N):
    s.append(s[i] + A[i])
ans = 0
for i in range(N):
    ans += A[i] * (s[N] - s[i + 1])
print(ans % (10 ** 9 + 7))

Finally

This time it was not good. Solve past questions and practice.

Recommended Posts

AtCoder ABC176
AtCoder ABC177
AtCoder ABC 174 Python
AtCoder ABC 175 Python
ABC168
ABC164
ABC174
Atcoder ABC115 Past Exercises
ABC175
ABC170
ABC182
ABC153
AtCoder ABC 177 Python (A ~ E)
Solve AtCoder ABC166 with python
AtCoder ABC 178 Python (A ~ E)
Atcoder ABC164 A-C in Python
Atcoder ABC167 A-D in Python
Atcoder ABC165 A-D in Python
Atcoder ABC166 A-E in Python
AtCoder ABC 182 Python (A ~ D)
I participated in AtCoder (ABC158)
Solve AtCoder ABC 186 with Python
Atcoder ABC169 A-E in Python
AtCoder ABC177 A-D in python
atCoder 173 Python
Solve Atcoder ABC169 A-D in Python
Atcoder ABC125 C --GCD on Blackboard
ABC146 Impressions
Challenge AtCoder
Solved AtCoder ABC 114 C-755 with Python3
ABC167 WriteUp
Template AtCoder ABC 179 Python (A ~ E)
AtCoder 174 BCD
I participated in AtCoder (ABC169 edition)
Atcoder ABC099 C --Strange Bank Separate Solution
Python beginner Atcoder memo @ KEYENCE 2020, ABC problem
[AtCoder] Solve ABC1 ~ 100 A problem with Python
AtCoder ABC155 Problem D Pairs Review Note 1
Solve AtCoder ABC168 with python (A ~ D)
Beginner ABC154 (Python)
AtCoder Beginner Contest 177
AtCoder devotion memo (11/12)
[AtCoder] Solve A problem of ABC101 ~ 169 with Python
abc154 participation report
abc155 participation report
Atcoder until green
AtCoder Beginner Contest 179
AtCoder Beginner Contest 172
AtCoder Beginner Contest 180
AtCoder ABC 098 C --Attention Thinking about the answer
Beginner ABC155 (Python)
AtCoder Beginner Contest 173
Beginner ABC157 (Python)
Solving with Ruby AtCoder ABC110 C String Manipulation
Atcoder Beginner Contest 153
Challenge AtCoder (ABC) 164 with Python! A ~ C problem
AtCoder devotion memo (11/11)