[PYTHON] AtCoder ABC176

Summary

I was able to AC up to the C problem. Achieved the goal because the goal is AC of A-C problem.

A - Takoyaki I wrote it according to the problem.

import math
N,X,T = map(float,input().split())

a = math.ceil(N / X)

print(int(a * T))

B - Multiple of 9 I wrote this along with the problem.

N = list(map(int,input().split()))
a = 0
for i in range(len(N)):
    a += N[i]
if a % 9 == 0:
    print("Yes")
else:
    print("No")

It looks like this was good. Concise and easy to understand.

N = int(input())

if N % 9 == 0:
    print('Yes')
else:
    print('No')

C - Step Add the stand until it is the same height as the previous person.

N = int(input())
A = list(map(int,input().split()))
ans = 0

for i in range(1,N):
    diff = A[i - 1] - A[i]
    if diff <= 0:
        pass
    else:
        ans += diff
        A[i] += diff
print(ans)

D - Wizard in Maze It was an unknown area after the D problem. Let's do our best to study past questions and algorithms.

Finally

I'm glad that I was able to AC up to the target C problem. Where you want to do your best with the goal of being quick and accurate.

Recommended Posts

AtCoder ABC176
AtCoder ABC177
AtCoder ABC 174 Python
AtCoder ABC187 Python
AtCoder ABC188 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 ABC 176 Python (A ~ E)
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
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 ABC60 D --Simple Knapsack Separate Solution
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
Beginner ABC156 (Python)
abc154 participation report
abc155 participation report
Atcoder until green
AtCoder Beginner Contest 172
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)
Review of atcoder ABC158, up to question E (Python)
Solve Atcoder ABC176 (A, B, C, E) in Python