ABC's A problem analysis for the past 15 times to send to those who are new to Python

Introduction

This article analyzes ABC's A problem and is an article for beginners such as "Only if statements and operations can be used". Sometimes it spans multiple genres (eg AtCoder Beginner Contest 182). It's a good idea to solve the problem that says "typical problem".

Types of sentences to use

Operation (+,-, *, /, //,%)

AtCoder Beginner Contest 184 A.Determinant AtCoder Beginner Contest 182 A.twiblr AtCoder Beginner Contest 181 A.Heavy Rotation AtCoder Beginner Contest 180 A.box AtCoder Beginner Contest 178 A.Not AtCoder Beginner Contest 177 A.Don't be late AtCoder Beginner Contest 173 A.Payment AtCoder Beginner Contest 172 A.Calc (typical problem)

min,max AtCoder Beginner Contest 185 A.ABC Preparation

if, else statement

AtCoder Beginner Contest 183 A.ReLU AtCoder Beginner Contest 182 A.twiblr AtCoder Beginner Contest 179 A.Plural Form AtCoder Beginner Contest 178 A.Not AtCoder Beginner Contest 177 A.Don't be late AtCoder Beginner Contest 174 A.Air Conditioner (typical problem) AtCoder Beginner Contest 173 A.Payment

Round up, round down

Round-up and round-down problems using math.ceil and int (//1 is acceptable) AtCoder Beginner Contest 176 A.Takoyaki

count The problem dealing with count can be solved by the combination of try and while True or the combination of if and for (the constraint of problem A does not TLE). Here, the problem that can be easily solved by using count is written only in count. AtCoder Beginner Contest 175 A.Rainy Season

in It is used to check if the elements in the list are included. (Here, in of for i in range is not included. AtCoder Beginner Contest 171 A.αlphabet

chr A built-in function that can create a list of alphabets. You can use [python] Create a list of different character types. AtCoder Beginner Contest 171 A.αlphabet

Impressions

There are many combinations of if and else statements and operations (eg AtCoder Beginner Contest 177 A. Don't be late). Also, problems that use many min, max, and count can be ACed by using an if statement. Surprisingly, there were few problems dealing with for and while. Also, there are many problems that you can get AC if you execute it as you are told. Older contests, such as AtCoder Beginner Contest 022 A.Best Body, have more than 300 difficulty levels, but most recent contests have single-digit difficulty levels. (Refer to AtCoder Problems.)

References

Recommended Posts

ABC's A problem analysis for the past 15 times to send to those who are new to Python
For those who are new to programming but have decided to analyze data with Python
[AWS] A story that may be helpful for those who are new to Lambda-Python and DynamoDB
Tips for those who are wondering how to use is and == in Python
[Solved] I have a question for those who are familiar with Python mechanize.
[Python] Solution to the problem that elements are linked when copying a list
For those who want to write Python with vim
The first step of machine learning ~ For those who want to implement with python ~
The first step for those who are amateurs of statistics but want to implement machine learning models in Python
For those who are having trouble drawing graphs in python
Knowledge for those who are only thinking about running the Qore SDK on a Mac
Environment construction procedure for those who are not familiar with the python version control system
A modern environment building procedure for those who want to get started with Python right away
[Short sentence] easygui for those who want to use a simple GUI with Python very easily
PyPI registration steps for those who want to make a PyPI debut
Create a shell script to run the python file multiple times
Python environment construction 2016 for those who aim to be data scientists
[Introduction to Python] How to use the in operator in a for statement?
Links to people who are just starting data analysis with python
I wanted to solve the ABC164 A ~ D problem with Python
Python techniques for those who want to get rid of beginners
How to send a request to the DMM (FANZA) API with python
A memo for those who use Python in Visual Studio (me)
[Comparison of PHP, Ruby, and Python description] For those who are wondering how the description method is different.
[Introduction to Udemy Python3 + Application] 47. Process the dictionary with a for statement
A summary of Python e-books that are useful for free-to-read data analysis
Send a message from Python to Slack
Try to solve the traveling salesman problem with a genetic algorithm (Python code)
A solution to the problem that the Python version in Conda cannot be changed
I want to create a nice Python development environment for my new Mac
For those who want to learn Excel VBA and get started with Python
Things to keep in mind when using Python for those who use MATLAB
5 Reasons Processing is Useful for Those Who Want to Get Started with Python
I searched for the skills needed to become a web engineer in Python
Send a direct love email to a new user when a new user joins the Slack team
Python script to get a list of input examples for the AtCoder contest
I tried to automatically send the literature of the new coronavirus to LINE with Python
[Introduction to Python] How to get the index of data with a for statement
A magic word (?) That may save people who are addicted to building using the Intel compiler of Python + Numpy.
Send a message from Slack to a Python server
The fastest way for beginners to master Python
Send a message to LINE with Python (LINE Notify)
Try to calculate a statistical problem in Python
Created a Python wrapper for the Qiita API
Dart grammar for those who only know Python
Try to solve the Python class inheritance problem
Python: Prepare a serializer for the class instance:
A python amateur tries to summarize the list ②
[Python] Throw a message to the slack channel
Tips for Python beginners to use the Scikit-image example for themselves 7 How to make a module
[Jinja2] Solution to the problem that variables added in the for statement are not inherited
[For those who have mastered other programming languages] 10 points to catch up on Python points
For Debian users who are having trouble with a bug in the Linux kernel 5.10
Environment construction for those who want to study python easily with VS Code (for Mac)
A solution to the problem that files containing [and] are not listed in glob.glob ()
[Python] I want to be a gourmet person [Data Driven approach] Choosing a store for the year-end and New Year holidays