I wanted to solve ABC160 with Python

Introduction

I could only solve A and B. It was easy.

A problem

Problem

** Thoughts ** If index is specified

s = str(input())
if s[2] == s[3]:
    if s[4] == s[5]:
        print('Yes')
        quit()
print('No')

B problem

Problem

** Thoughts ** Divide X by 500 and divide the remainder by 5 in the same way.

x = int(input())
a = x // 500
b = (x % 500) // 5
ans = (1000*a+5*b)
print(ans)

C problem

Problem

** Thoughts ** The distance should be such that the difference between the elements next to K --A is minimized. It took me more than an hour to notice this, and I had enough time to implement it.

Summary

Thank you for everything. You should not force yourself into the contest when you are tired. good night.

Recommended Posts

I wanted to solve ABC160 with Python
I wanted to solve ABC172 with Python
I wanted to solve ABC159 in Python
I wanted to solve NOMURA Contest 2020 with Python
I wanted to solve the ABC164 A ~ D problem with Python
I wanted to solve the Panasonic Programming Contest 2020 with Python
Solve AtCoder ABC166 with python
I wanted to install Python 3.4.3 with Homebrew + pyenv
I want to solve APG4b with Python (Chapter 2)
Solve AtCoder ABC 186 with Python
I tried to solve the soma cube with python
I tried to solve the problem with Python Vol.1
I tried to solve AOJ's number theory with Python
Solve ABC163 A ~ C with Python
Solve ABC168 A ~ C with Python
Solve ABC162 A ~ C with Python
Solve ABC167 A ~ C with Python
Solve ABC158 A ~ C with Python
I want to debug with Python
I want to analyze logs with Python
I want to play with aws with python
[AtCoder] Solve ABC1 ~ 100 A problem with Python
Solve AtCoder ABC168 with python (A ~ D)
I tried to solve TSP with QAOA
I really wanted to copy with selenium
I want to solve APG4b with Python (only 4.01 and 4.04 in Chapter 4)
Solve AtCoder 167 with python
Solve Sudoku with Python
Solve ABC169 in Python
Solve POJ 2386 with python
[AtCoder] Solve A problem of ABC101 ~ 169 with Python
I want to use MATLAB feval with python
I want to make a game with Python
I wanted to play with the Bezier curve
I tried to get CloudWatch data with Python
I tried to output LLVM IR with Python
I want to use Temporary Directory with Python2
I tried to automate sushi making with python
#Unresolved I want to compile gobject-introspection with Python3
I want to write to a file with Python
It's more recent, but I wanted to do BMI calculation with python.
How to write offline real time I tried to solve E12 with python
[Python] Solve equations with sympy
I tried fp-growth with python
I tried scraping with Python
Connect to BigQuery with Python
Try to solve the programming challenge book with python3
I also wanted to check type hints with numpy
ABC163 C problem with python3
I want to handle optimization with python and cplex
I tried to implement Minesweeper on terminal with python
I tried to get started with blender python script_Part 01
Try to solve the internship assignment problem with Python
I made blackjack with python!
I tried to touch the CSV file with Python
Connect to Wikipedia with Python
Solve ABC176 E in Python
I tried to get started with blender python script_Part 02
I wanted to use the Python library from MATLAB
I want to solve Sudoku (Sudoku)
I was addicted to scraping with Selenium (+ Python) in 2020