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 3 years have passed since last update.

ABC176 A-Cやってみた

Posted at

出よう出ようと思いつつも用事が入ったので……。
418a6d2aa47db27afa160152ee1d8dbf.png
10分足らずでCまでは行けました。その先は謎です。

A - Takoyaki

割って切り上げてかける

from math import ceil
n,x,t=map(int,input().split())
print(ceil(n/x)*t)

#B - Multiple of 9
各桁足して9で割る

n=[int(i)for i in input()]
print("Yes" if sum(n)%9==0 else "No")

#C - Step
$A_{n-1}$が$A_n$より大きかったら$A_{n-1}-A_n$を$A_n$と答え用の変数に加えて行く。

n=int(input())
a=[int(i)for i in input().split()]
res=0
for i in range(1,n):
    if a[i-1]>a[i]:
        tmp=a[i-1]-a[i]
        a[i]+=tmp
        res+=tmp
print(res)

#D - Wizard in Maze
全くとっかかりすらつかめなかったのでアーッアアアーッてなった。

#おわりに
Dから先が未知の概念と化しているのはなんとかしないとなあと思いました。
ここのギャップはかなり大きく感じるような。

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?