0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

社会人エンジニアがatcoderで茶色を目指す#4

Last updated at Posted at 2020-05-09

先人達が残してくれた資料

後から始める人達の為に素晴らしい記事を残してくれました。
AtCoder に登録したら次にやること ~ これだけ解けば十分闘える!過去問精選 10 問 ~

素直に勉強していきたいと思います。

A - Product

問題文はAtcoderを参照してください。

a, b = map(int,input().split());

if (a*b)%2==1:
    print("Odd");
else:
    print("Even");

A - Placing Marbles

問題文はAtcoderを参照してください。

s=str(input())
c=0
for i in range(0,3):
    if s[i]=="1":
        c+=1

print(c)

B - Shift only

問題文はAtcoderを参照してください。

N = int(input())
A = list(map(int, input().split()))
ans=0
isLoop=True
while(isLoop):
    c=0
    for i in range(0, N):
        if A[i]%2==0:
            c+=1
        else:
            isLoop=False

    if c==N:
        for i in range(0, N):
            A[i] = A[i]/2

        ans+=1

print(ans)

B - Coins

問題文はAtcoderを参照してください。

A, B, C, X = [int(input()) for i in range(4)]
 
ans = 0
for i in range(0, A+1):
    for j in range(0, B+1):
        for k in range(0, C+1):
            if (i*500 + j*100 + k*50)==X:
                ans+=1
 
print(ans)

B - Some Sums

問題文はAtcoderを参照してください。

N, A, B = map(int,input().split())
 
ans = 0
for i in range(0, N+1):
    tmp=i
    sum=0
    while(tmp>0):
        sum += tmp%10
        tmp = int(tmp/10)

    if A<=sum and sum<=B:
        ans+=i
 
print(ans)

ABC088B - Card Game for Two

問題文はAtcoderを参照してください。
この問題はbeginners selectionで記載しました。

B - Kagami Mochi

問題文はAtcoderを参照してください。
この問題はbeginners selectionで記載しました。

ABC085C - Otoshidama

問題文はAtcoderを参照してください。
この問題はbeginners selectionで記載しました。

C - 白昼夢

問題文はAtcoderを参照してください。
この問題はbeginners selectionで記載しました。

C - Traveling

問題文はAtcoderを参照してください。
この問題はbeginners selectionで記載しました。

終わってみて

整数における特定の桁を取り出すなど整数の扱い方を学べました。
明日は「ここまで解いたら」にあった問題に取り組みたいと思います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?