TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
H, W = map(int, input().split())
Ch, Cw = map(int, input().split())
Dh, Dw = map(int, input().split())
S=[list(map(str, list(input()))) for i in range(H)]

ah = Ch
aw = Cw
count = 0

while (ah != Dh) or (aw != Dw):
    h = Dh - ah
    w = Dw - aw
    if h > 0:
        if S[ah+1][aw] == '.':
            ah = ah + 1
    if h < 0:
        if S[ah-1][aw] == '.':
            ah = ah - 1
    if w > 0:
        if S[ah][aw+1] == '.':
            aw = aw + 1
    if w < 0:
        if S[ah][aw-1] == '.':
            aw = aw - 1
print(count)    

N, X, T = map(int, input().split())
import math
a = math.ceil(N/X)
b = a*T
print(b)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import math
N, X, T = int(input())

print(T * math.ceil(N / X))

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

print(T * math.ceil(N / X))


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

print(T * math.ceil(N / X))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
a = input()
s = 0
for i in a:
    s += int(i)
if s % 9 == 0 :
    print("Yes")
else:
    print("No")

a = input().split(" ")
g = int(a[0])
c = int(a[1])
b = int(a[2])
l = c
m = b
while c < g :
    c = c + l
    b = b + m
print(b)


Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import sys
input = sys.stdin.readline
read = lambda: list(map(int, input().strip().split()))
n, x, t = read()
print(n//x * t)

import sys
from math import sqrt, gcd, ceil, log, floor
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
input = sys.stdin.readline
read = lambda: list(map(int, input().strip().split()))

MOD = 10**9 + 7


def main():
	# ans_ = []
	# ans_.append(ans)
	# print(("\n").join(map(str, ans_)))
	n, x, t = read()
	print((n//x + (n%x)>0))






if __name__ == "__main__":
	main()

import sys
from math import sqrt, gcd, ceil, log, floor
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
input = sys.stdin.readline
read = lambda: list(map(int, input().strip().split()))

MOD = 10**9 + 7


def main():
	# ans_ = []
	# ans_.append(ans)
	# print(("\n").join(map(str, ans_)))
	n, x, t = read()
	print(ceil(n/x)*t)






if __name__ == "__main__":
	main()

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n,x,t=map(int,input().split())
print(n//x+((n%x)!=0)*t)

n,x,t=map(int,input().split())
print((n//x+((n%x)!=0)*t)


n,x,t=map(int,input().split())
print((n//x+((n%x)!=0))*t)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = map(int, input().split())

mod = n % x

print(((n-mod)/x + 1)*t)

n, x, t = map(int, input().split())

mod = n % x

if mod != 0:
    print(int(((n-mod)/x + 1)*t))

if mod == 0:
    print(int(((n-mod)/x)*t))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n,x,t = map(int, input().split())
print(t*(n+x-1)/x)

n,x,t = map(int, input().split())
print((n+x-1)/x * t)

n,x,t = map(int, input().split())
print((n+x-1)//x * t)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n,x,t = map(int,input().split())
if n%x == 0:
  print(n/x)
else:
  print((n/x) + 1)

n,x,t = map(int,input().split())
if n%x == 0:
  print(int((n/x)*t))
else:
  print(int(((n//x)+1)*t))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import numpy as np

H, W, M = map(int, input().split())
h_t = [0]*H
w_t = [0]*W
t = {}
for i in range(M):
    h, w = map(int, input().split())
    t[(h-1, w-1)] = 1
    h_t[h-1]+=1
    w_t[w-1]+=1
print(t)
h_max = max(h_t)
h_max_list = [i for i in range(len(h_t)) if h_t[i] == h_max]
w_max = max(w_t)
w_max_list = [i for i in range(len(w_t)) if w_t[i] == w_max]

for h in h_max_list:
    for w in w_max_list:
        if (h, w) not in t:
            print(h_max + w_max)
            exit()
print(h_max + w_max - 1)

N, X, T = map(int, input().split())
a = (N // X) * T
if N % X != 0:
    a += T
print(a)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n,x,t=list(map(int,input().split()))
a=n%x
b=n//x

if a==0:
  c=b*t
else :
  c=(b+1)*t
print(C)



1=<N,X,T=<1000
number =N/X
number =round(number)
time = number*T
print(time)

n,x,t=list(map(int,input().split()))
a=n%x
b=n//x
 
if a==0:
  c=b*t
else:
  c=(b+1)*t
print(c)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N = int(input())
X = int(input())
T = int(input())
if N % X == 0:
    c = N / X
else:
    c = int(N / X) + 1 
print(c*T)


print("a")
N = int(input("N = ?"))
X = int(input("X = ?"))
T = int(input("T = ?"))
if N % X = 0:
    c = N / X
else:
    c = int(N / X) + 1 
print(c)

n, x, t = input().split()
N = int(n)
X = int(x)
T = int(t)
if N % X == 0:
    c = N / X
else:
    c = int(N / X) + 1 
C = int(c)
print(C*T)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N = int(input())
X = int(input())
T = int(input())
if N % X == 0 :
  print((N/X)*T)
else :
  print(((N/X)+1)*T)

N,X,T = map(int,input().split())
if N % X == 0:
  print((N/X)*T)
else :
  print(((N/X)+1)*T)

N, X, T = map(int,input().split())
print(-(-N // X) * T)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = list(map(input()))

if n % x == 0:
  return n / x * t
else n % x != 0:
  return (n // x + 1) * t

import math

a = list(map(int, input()split()))

print(math.ceil(a[0] / a[1]) * a[2])

import math

a = list(map(int, input().split()))

print(math.ceil(a[0]/a[1]) * a[3])

import math

n = input()
x = input()
t = input()

if n % x == 0:
  return (n / x) * t
else n % x != 0:
  return math.ceil(n / x) * t



import math

a = list(map(int, input().split()))

print(math.ceil(a[0]/a[1]) * math[2])

import math

n = input()
x = input()
t = input()

def takoyakikun():
  times = math.ceil(n/x)
  return times * t

print(takoyakikun)

a = list(map(int, input().split()))

print(math.ceil(a[0] / a[1]) * t)

import math

a = list(map(int, input().split()))

print(math.ceil(a[0] / a[1]) * a[2])

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n.x.t = map(int, input().split())
w = n//x
if (n % x) == 0:
    print(w * t)
else:
    w += 1
    print(w * t)



N = input()
X = input()
T = input()

wari = int( N / X )

if N % X == 0:
  print (wari)
  else
  wari = wari + 1
  print (wari)

n = int(input())
x = int(input())
t = int(input())
w = n//x
if (n % x) == 0:
    print(w * t)
else:
    w += 1
    print(w * t)

n,x,t = map(int, input().split())
w = n//x
if (n % x) == 0:
    print(w * t)
else:
    w += 1
    print(w * t)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import math
N, X, T = map(int,input().zsplit())

a = math.ceil(N / X)
b = T * a

print(b)

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

a = math.ceil(N / X)
b = T * a

print(b)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N = int(input())
X = int(input())
T = int(input())

a = N/X
b = N//X
k1 = a*T
k2 = k1 + T
if b == 0:
  print(k1)
else:
  print(k2)

N = int(input())
X = int(input())
T = int(input())

a = N/X
b = N//X
k1 = a*T
k2 = k1 + 1
if b == 0:
  print(k1)
else:
  print(k2)

N = int(input())
k = 0
x = 0
while N > 1: 
  N = N/10
  k += 1
for i in range(k):
  N = N*10
  a = N//10
  x = x + a
  N = N - a
if x//9 == 0:
  print("yes")
else:
  print("no")

N = int(input())
X = int(input())
T = int(input())

a = N/X
b = N//X
if b == 0:
  print(a*T)
else:
  print(a*T + 1)
  

N = float(input())
X = float(input())
T = float(input())

a = N/X
b = N//X
k1 = a*T
k2 = k1 + T
if b == 0:
  print(k1)
else:
  print(k2)

[N, X, T] = input[] 

a = N/X
b = N//X
k1 = a*T
k2 = k1 + T
if b == 0:
  print(k1)
else:
  print(k2)

s = input().split()
N = int(s[0])
X = int(s[1])
T = int(s[2])
a = N//X
b = N%X
k1 = a*T
k2 = k1 + T
if b == 0:
  print(k1)
else:
  print(k2)
  

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import sys
import os
from collections import deque

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")

INF = float("inf")

H,W = LI()
C = LI()
D = LI()
maze = [list(_S()) for i in range(H)]

def bfs():
    
    d = [[INF] * W for i in range(H)]
    
    sx = C[0]-1
    sy = C[1]-1
    gx = D[0]-1
    gy = D[1]-1

    
    que = deque([])
    que.append((sx, sy))
    d[sx][sy] = 0

    
    que2 = deque([])

    
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]

    
    dx2 = [-2, -2, -2, -2, -2, -1, -1, -1, -1,  0, 0, 1, 1,  1,  1, 2, 2, 2,  2, 2]
    dy2 = [-2, -1,  0,  1,  2, -2, -1,  1,  2, -2, 2, 2, 1, -1, -2, 2, 1, 0, -1, -2]

    while que: 
        while que:
            p = que.popleft()       
            
            if p[0] == gx and p[1] == gy:
                ans = d[p[0]][p[1]]
                print(ans)
                exit()
            que2.append((p[0], p[1]))
            
            for i in range(4):
                
                nx = p[0] + dx[i]
                ny = p[1] + dy[i]

                
                if 0 <= nx < H and 0 <= ny < W and maze[nx][ny] != "#" and d[nx][ny] == INF:
                    
                    que.append((nx, ny))
                    d[nx][ny] = d[p[0]][p[1]]
                    
        while que2:
            
            p = que2.popleft()
            for i in range(20):
            # for dxi in range(-2,3):
            #     for dyi in range(-2,3):
                nx = p[0] + dx2[i]
                ny = p[1] + dy2[i]
                if 0 <= nx < H and 0 <= ny < W and maze[nx][ny] != "#" and d[nx][ny] == INF:
                    
                    que.append((nx, ny))
                    d[nx][ny] = d[p[0]][p[1]]+1  
        
    return

bfs()
print(-1)

import math
import numpy as np
import sys
import os
from operator import mul

sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353    

# N = I()
N,X,T = LI()

ans = math.ceil(N/X) * T

print(ans)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):

def input2():
	return map(int,input().split())


def input_array():
	return list(map(int,input().split()))
  
n,x,t=input2()
ans=(math.ceil(n/x))*t
print(ans)

import math


def input2():
	return map(int,input().split())


def input_array():
	return list(map(int,input().split()))
  
n,x,t=input2()
ans=(math.ceil(n/x))*t
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = map(int, input().split())
print((n + x - 1) / x * t)

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

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = map(int, input().split())
print((n//x)*t)

s = list(map(int, input().split()))
print(int((s[0]+(s[1]-1))/s[1]*s[2]))

s = list(map(int, input().split()))
print(int((s[0]+(s[1]-1))//s[1]*s[2]))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N,X,T=input(),input(),input()

m=(N//X)*T

if N%X==0:
  print(m)
else:
  print(m+1)

N,X,T = map(int, input().split())  


m=(N//X) 
m1=m*T


if N%X==0:
  print(m)
else:
  print(m+1)


N,X,T=input(),input(),input()

m=(N//X) 
m1=m*T

if N%X==0:
  print(m)
else:
  print(m+1)


N,X,T = map(int, input().split())  


m=(N//X) 
m1=m*T


if N%X==0:
  print(m1)
else:
  print(m1+T)


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N,X,T = map(int,input().split())
count=0
if N <=X:
  print(T)
  break
elif N > X:
  while N > X:
    N = N - X
    count+=1
  print(T*count)

N,X,T = map(int,input().split())
count = 1
while N > X:
  N = N - X
  count += 1
print(T*count)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = map(int,input().split())
res = 0

res = n // x * t
if n % x != 0:
  res += t
  
print(t)

n, x, t = map(int,input().split())
res = 0

res = n // x * t
if n % x != 0:
  res += t
  
print(res)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import math
N,X,T = map(int,input().split())
print(math.floor(N/X)*T)

import math
N,X,T = map(int,input().split())
print(math.ceil(N/X)*T)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = map(int, input().split())
if n % x == 0:
    c = n / x
else:
    b = n / x
    c = b // 1
a = int(c * t)
print(a)

import math
n,x,t = map(float,input().split())
if n%x == 0:
    c = n/x
else:
    c = math.ceil(n/x)
a = c*t
print(a)

import math
N,X,T=map(int,input().split))
A=T*(math.ceil(N/X))
print(A)

n,x,t = map(int,input().split())
if n % x == 0:
    c = n / x
else:
    b = n / x
    c = b // 1
a = c * t
print(a)

import math
N,X,T=input().split()
B=math.ceil(N/X)
A=T*B
print(A)

import math
n,x,t = map(float,input().split())
c = n/x
b = math.ceil(c)
a = t*b
print(a)

import math
n,x,t = map(float,input().split())
if n%x == 0:
    c = n/x
else:
    b = n/x
    c = math.ceil(b)
a = c*t
print(a)

import math
N,X,T=map(int,input().split))
B=math.ceil(N/X)
A=T*B
print(A)

from math import ceil,floor
N,X,T=input().split()
A=T*(ceil(N/X))
print(A)

n, x, t = map(int, input().split())
if n % x == 0:
    c = n / x
else:
    b = n / x
    c = b // 1
a = int(c * t)
print(a)


import math
N,X,T=float(int,input().split())
B=math.ceil(N/X)
A=T*B
print(A)

n,x,t = map(int,input().split())
if n%x == 0:
    c = n/x
else:
    b = n/x
    c = b//1
a = c*t
print(a)

import math
n, x, t = map(int, input().split())
if n % x == 0:
    c = n / x
else:
    b = n / x
    c = math.ceil(b)
a = int(c * t)
print(a)


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import sys

n, x, t = sys.stdin.readlines()[0].split()
n, x, t = int(n), int(x), int(t)
return math.ceil(n/x) * t

import sys
import math

n, x, t = sys.stdin.readlines()[0].split()
n,x,t = float(n),int(x),int(t)

print(int(math.ceil(n/x) * t))

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n,x,t = map(int,input().split())

ans = int(n/x)*t

if(n%x != 0):
  ans += t
  


n,x,t = map(int,input().split())
 
ans = int(n/x)*t
 
if(n%x != 0):
  ans += t
  
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n,x,t=map(int,input().split())
k=n//x
print((t+1)*k)

n,x,t=map(int,input().split())
k=n//x
if n==k*x:
  print(k*t)
else:
  print((k+1)*t)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, maxx, time = map(int, input.split())
ans = time * (N //maxx + 1)
if(N != 0): 
  	print(ans)
else 
	print("0")

N,maxx,time = map(int, input.split())
if (N!= 0):
	ans = time*(N //maxx + 1)
else :
	ans=0  
print(ans)

def multiplier(N,maxx,time):
  if N%maxx==0 :
    return N//maxx
  else :
    return N//maxx+1
  
def main():
	N,maxx,time = map(int, input().split())
	if N!=0 :
		ans = time * multiplier(N,maxx,time)
	else:
		ans=0  
	print(ans)
    
if __name__ == '__main__':
  main()
  

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = map(int, input().split())

ans = N // X
if N % X != 0:
    ans += 1

print(ans)


N, X, T = map(int, input().split())

ans = (N // X) * T
if N % X != 0:
    ans += T

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
    N, X, T = map(int, input().split())
    if N % X == 0:
        ans = N / X * T
    else:
        ans = (N // X + 1) * T
    print(int(ans))

N, X, T = map(int, input().split())
if N % X == 0:
    ans = N / X * T
else:
    ans = (N // X + 1) * T
print(int(ans))

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = map(int, input.split())
print((N + X - 1) / X * T)

N, X, T = map(int, input().split())
print((N + X - 1) / X * T)


N, X, T = map(int, input().split())
print((N + X - 1) // X * T)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import math

N, X, T = map(int, input().split())

print(math.ceil(N / X))

import math

N, X, T = map(int, input().split())

print(math.ceil(N / X) * T)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
# -*- coding: utf-8 -*-
from collections import Counter as C

h, w, m = map(int, input().split())

hs, ws = [], []
hw = []

for i in range(m):
    hi, w = map(int, input().split())
    hs.append(hi)
    ws.append(w)
    hw.append([hi, w])


ch = C(hs).most_common()
cw = C(ws).most_common()
anss = []
pre_ans = -float('inf')
mrow = ch[0][0]
mcow = cw[0][0]

for num1, num2 in zip(ch, cw):
    row, cow = num1[0], num2[0]
    if mrow > row and mcow > cow:
        break
    ans1 = hs.count(row)
    ans2 = ws.count(cow)
    ans = ans1 + ans2

    if [row, cow] in hw:
        ans -= 1

    anss.append(ans)

    if pre_ans >= ans:
        ans = pre_ans
    else:
        pre_ans = ans


print(max(anss))


# -*- coding: utf-8 -*-
from collections import Counter as C

h, w, m = map(int, input().split())

hs, ws = [], []
hw = []

for i in range(m):
    hi, w = map(int, input().split())
    hs.append(hi)
    ws.append(w)
    hw.append([hi, w])


ch = C(hs).most_common()
cw = C(ws).most_common()
anss = []
pre_ans = -float('inf')
mrow = ch[0][0]
mcow = cw[0][0]

for num1, num2 in zip(ch, cw):
    row, cow = num1[0], num2[0]
    if mrow > row and mcow > cow:
        break
    ans1 = hs.count(row)
    ans2 = ws.count(cow)
    ans = ans1 + ans2

    if [row, cow] in hw:
        ans -= 1

    anss.append(ans)


print(max(anss))


import math
n, x, t = map(int, input().split())

y = math.ceil(n / x) * t
print(int(y))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import math

num_list = input().split()

print(math.ceil(int(num_list[0]) / int(num_list[1])) * int(num_list[2])

import math

num_list = input().split(" ")

print(math.ceil(int(num_list[0]) / int(num_list[1])) * int(num_list[2])

import math

num_list = input().split(" ")

print(math.ceil(int(num_list[0]) / int(num_list[1])) * int(num_list[2]))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = map(int, input().split())
time = int(n/x)
print(time*t)

n,x,t = map(int, input().split())
 
if n <= x:
  print(t)
elif n % x == 0:
  print(n//x*t)
else:
  print((n//x+1)*t)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
z, x, t = map(int, input().split())

ans = math.ceil(z/x)*t


n = int(input())
if n%9 == 0:
  print('Yes')
else:
  print('No')

import math
z,x,t=map(int, input().split())

ans =math.ceil(z/x)*t
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = map(int, input().split())

import math

print(t*math.ceil(int(input())/x))

n, x, t = map(int, input().split())

import math

print(t*math.ceil(n/x))

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = map(int, input().split())
time = (N // X) * T
print(time)

N, X, T = map(int, input().split())
if N % X != 0: 
  time = ((N // X) + 1) * T
else:
  time = (N // X) * T
print(time)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = map(int, input().split())

print(T * (N+X-1)//X)

N, X, T = map(int, input().split())
print(T * ((N+X-1)//X))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = map(int,input().split())

ans=N//X*T if N%X==0 else ans=(N//X+1)*T
print(ans)

n, x, t = map(int, input().split())
if n % x == 0:
    ans = n//x
else :
    ans = n//x + 1
 
ans *= t
print(ans)
 

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N,X,T=map(int,input().split())

if N%X==0:
  print(N/X*T)
else:
  print((round(N/X)*T+T))

import math

N,X,T=map(int,input().split())

if N%X==0:
  print(N//X*T)
else:
  b=int((N//X)*T+T)
  print(b)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = map(int, input().split())
if n%x == 0:
    print(n//x * t)
else:
    print((n//x + 1)+t)

n, x, t = map(int, input().split())
if n%x == 0:
    print(n//x * t)
else:
    print((n//x + 1)*t)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):

# A - Takoyaki

import math

N,X,T=map(int,input().split())

pritn(math.ceil(N/X)*T)


# A - Takoyaki

N,X,T=map(int,input().split())

if N%X==0:
    num=N//X
else:
    num=N//X +1

print(num*T)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
a = int(input())
if a%9:
  print('No')
else:
  print('Yes')
  


a = int(input())
if a%9==0:
  print('Yes')
else:
  print('No')
  


import numpy as np
a,b,c = map(int,input().split())
print(int(np.ceil(a/b)*c))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
h, w, m = map(int, input().split())
 
mp = []
hp = [0] * h
wp = [0] * w
 
for i in range(m):
    l = list(map(int, input().split()))
    mp.append(l)
    hp[l[0]-1] += 1
    wp[l[1]-1] += 1
 
maxhp = max(hp)
maxwp = max(wp)
hpdex = [i for i, x in enumerate(hp) if x == maxhp]
wpdex = [i for i, x in enumerate(wp) if x == maxwp]
 
for i in range(len(hpdex)):
    for j in range(len(wpdex)):
        if [hpdex[i] + 1, wpdex[j] + 1] not in mp:
            print(maxhp + maxwp)
            exit()
 
print(maxhp + maxwp - 1)



n, x, t = map(int, input().split())
if n % x == 0:
    print(n // x * t)
else:
    print((n // x + 1) * t)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = map(int, input().split())
print((n + 1) // x * t)

n, x, t = map(int, input().split())
print((n + x - 1) // x * t)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import math as m

N=input()
X=input()
T=input()

N=int(N)
X=int(X)
T=int(T)

s=N/X
s=m.ceil(s)
s=int(s)
i=s*T
print(i)

import math as m

s=N/X
s=m.ceil(s)
s=int(s)
i=s*T
print(i)

import math as m

N=int(input())
X=int(input())
T=int(input())
s=N/X
s=m.ceil(s)
s=int(s)
i=s*T
print(i)

import math as m

N=input()
X=input()
T=input()

N=int(N)
X=int(X)
T=int(T)

s=N/X
s=m.ceil(s)
s=int(s)
i=s*T
print(i)

import math as m

s=N/X
s=m.ceil(s)
s=int(s)
i=s*T
print(i)

import math as m

LIST=list(map(int,input().split()))

N=LIST[0]
X=LIST[1]
T=LIST[2]

s=N/X
s=m.ceil(s)
s=int(s)
i=s*T
print(i)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = map(int, input().split())
time = N // X * T + T * N % T
print(int(time))

N, X, T = map(int, input().split())
if N % X == 0:
  time = ( N // X ) * T
else:
  time = ( N // X ) * T + T
print(int(time))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
a=inpiut()
a=[int(i) for i in a.split()]

n=int(a[0]/a[1])
print(n*a[2])

import math
a=input()
a=[int(i) for i in a.split()]

n=math.ceil(a[0]/a[1])
print(n*a[2])

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = [int(i) for i in input().spilt()]

ans = 0

if N % X == 0:
  ans = (N // X) * T
else :
  ans = ((N // X) + 1) * T 

print(ans)

N, X, T = [int(i) for i in input().split()]
 
q, r = divmod(N, X)
 
output = 0
if r > 0:
    output = (q+1) * T
else :
    output = q * T
    
print(output)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import math
n, x, t = list(map(int, input().split()))
z = n / x
if z == n//x:
  k = int(z)+1
  print(k * t)
else:
  print(int(z) * t)

n, x, t = list(map(int, input().split()))
z = n / x
if z != float(n//x):
    k = int(z) + 1
    print(k * t)
else:
    print(int(z) * t)



Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
x = list(map(lambda i: int(i), input().split(' ')))
all = x[0]
available = x[1]
time = x[2]

result = (all/available) * time
if all%available != 0:
    result += time 

print(int(result))

x = list(map(lambda i: int(i), input().split(' ')))
all = x[0]
available = x[1]
time = x[2]

result = int(all/available) * time
#print(result)
if all%available != 0:
    result += time 

print(int(result))

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = map(int,input().split())

ans = 0
while(N >= X):
    if N >= X:
        ans += T
        N = N - X
    else:
        ans += T
        break
    
    
print(ans)

N, X, T = map(int,input().split())

ans = 0
while(N >= 0):
    if N == 0:
        break
    if N >= X:
        ans += T
        N = N - X
    else:
        ans += T
        break
    
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = map(int, input().split())

cnt = N // X
if N % X == 0:
  cnt += 1

print(T*cnt)

N, X, T = map(int, input().split())

cnt = N // X
if N % X != 0:
  cnt += 1

print(T*cnt)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n,x,t=input().split()
n=int(n)
x=int(x)
t=int(t)
q,mod=divmod(n,x)
if amari==0:
  print(q*t)
else:
  print(q*(t+1))

n,x,t=input().split()
n=int(n)
x=int(x)
t=int(t)
syou,amari=divmod(n,x)
if amari==0:
  print(syou*t)
else:
  print(syou*(t+1))
  

n,x,t=input().split()
n=int(n)
x=int(x)
t=int(t)
q,mod=divmod(n,x)
if mod==0:
  print(q*t)
else:
  print((q+1)*t)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N,X,T=map(int,input().split())
if N%X=0:
  print((N/X)*T)
else:
  print((N//X+1)*T)

N,X,T=map(int,input().split())
if N%X==0:
  print((N//X)*T)
else:
  print((N//X+1)*T)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
a,b,c = map(int,input().split())
if a%b ==0:
  time = a%b * c
else:
  time = (a%b + 1) *c
print(time)


a,b,c = map(int,input().split())
if a%b ==0:
  time = (a//b) * c
else:
  time = (a//b + 1) *c
print(time)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
import math

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

import math

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

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N,X,T = map(int,input().split())
kaisuu = N//12
if kaisuu*X < N:
    zikan = kaisuu+zikan
else:
    zikan = kaisuu
print(zikan)

N,X,T = map(int,input().split())
kaisuu = N//X
if kaisuu*X < N:
    zikan = (kaisuu+1)*T
else:
    zikan = kaisuu*T
print(zikan)

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = map(int, input().split())

if N / X:
	print(N / X * T)
else:
	print((N / X + 1) * T)


N, X, T = input().split()

if N / X:
	print(N / X * T)
else:
	print((N / X + 1) * T)


N, X, T = map(int, input().split())

if N // X:
	print(N // X * T)
else:
	print((N // X + 1) * T)


N, X, T = map(int, input().split())

if N % X:
	print((N // X + 1) * T)
else:
	print(N // X * T)


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n=input()
s=0
for i in n:
  s+=int(i)
  s=s%9
if s%9==0:
  print(Yes)
else:
  print("No")
  

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

Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N, X, T = map(int,input().split())
if N % X == 0:
  print( T*N // X )
else:
  print( N*T // X + N )


N, X, T = map(int,input().split())
if T % X == 0:
  print( T // X )
else:
  print( T // X + 1 )

if (int(input())%9 == 0:
  print("Yes")
else:
  print("No")


N, X, T = map(int,input().split())
if X % T == 0:
  print( X // T )
else:
  print( X // T + 1 )


 N, X, T = map(int,input().split())
if N % X == 0:
  print( T*N // X )
else:
  print( N*T // X + T )


N, X, T = map(int,input().split())
if N % X == 0:
  print((N//X)*T)
else:
  print((N//X+1)*T)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n,x,t=map（int,input（）.split（））

if n%x==0 :
  print（（n//x）*t）
else :
  print（（n//x+1）*t）

n,x,t=map(int,input().split())
if n%x!=0 :
    print((n//x+1) *t)
else:
    print((n//x)*t)


Verdicts: Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
param=input().split()

ama=int(param[0])%int(param[1])
print(ama)
war=(int(param[0])-ama)/int(param[1])
print(war)

if ama==0:
    tim=war*int(param[2])
else:
    tim=(war+1)*int(param[2])

print(int(tim))

param=input().split()

ama=int(param[0])%int(param[1])
print(ama)
war=(int(param[0])-ama)/int(param[1])
print(war)

if ama==0:
    tim=war*int(param[2])
else:
    tim=(war+1)*int(param[2])

tim=int(tim)
print(tim)

param=list(map(int,input().split()))

ama=param[0]%param[1]
war=(param[0]-ama)/param[1]

if ama==0:
    tim=war*param[2]
else:
    tim=(war+1)*param[2]

print(int(tim))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
n, x, t = map(int, input().split())
a = 0

print(n, x, t)

a = (n + (x - 1)) // x

print(a * t)

n, x, t = map(int, input().split())
a = 0
a = (n + (x - 1)) // x
print(a * t)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
def resolve():
    from collections import deque

    h, w = map(int, input().split())
    c_h, c_w = map(int, input().split())
    c_h -= 1
    c_w -= 1
    d_h, d_w = map(int, input().split())
    d_h -= 1
    d_w -= 1
    dist = [[10**18 for i in range(w)] for i in range(h)]
    dist[c_h][c_w] = 0

    C = []
    for _ in range(h):
        C.append(list(input()))
    D = [(-1, 0), (1, 0), (0, -1), (0, 1)]
    queue = deque([(c_h, c_w)])

    while queue:
        (x, y) = queue.popleft()
        d = dist[x][y]

        for (dx, dy) in D:
            new_x, new_y = x + dx, y + dy
            if -1 < new_x < h and -1 < new_y < w:
                if C[new_x][new_y] == '.' and dist[new_x][new_y] > d:
                    dist[new_x][new_y] = d
                    queue.appendleft((new_x, new_y))

        for dx in range(-2, 3):
            for dy in range(-2, 3):
                if -1 < x + dx < h and -1 < y + dy < w and (dx != 0 or dy != 0):
                    if C[x + dx][y + dy] == '.' and dist[x + dx][y + dy] > d:
                        dist[x + dx][y + dy] = d + 1
                        queue.append((x + dx, y + dy))

    ans = dist[d_h][d_w]
    if ans == 10**18:
        print(-1)
    else:
        print(ans)

resolve()

def resolve():
    from collections import deque

    h, w = map(int, input().split())
    c_h, c_w = map(int, input().split())
    c_h -= 1
    c_w -= 1
    d_h, d_w = map(int, input().split())
    d_h -= 1
    d_w -= 1
    dist = [[10**18 for i in range(w)] for i in range(h)]
    dist[c_h][c_w] = 0

    C = []
    for _ in range(h):
        C.append(list(input()))
    D = [(-1, 0), (1, 0), (0, -1), (0, 1)]
    queue = deque([(c_h, c_w)])

    while queue:
        (x, y) = queue.popleft()
        d = dist[x][y]

        for (dx, dy) in D:
            new_x, new_y = x + dx, y + dy
            if -1 < new_x < h and -1 < new_y < w:
                if C[new_x][new_y] == '.' and dist[new_x][new_y] > d:
                    dist[new_x][new_y] = d
                    queue.appendleft((new_x, new_y))

        for dx in range(-2, 3):
            for dy in range(-2, 3):
                if -1 < x + dx < h and -1 < y + dy < w and (x + dx == 0 and y + dy == 0):
                    if C[x + dx][y + dy] == '.' and dist[x + dx][y + dy] > d:
                        dist[x + dx][y + dy] = d + 1
                        queue.append((x + dx, y + dy))

    ans = dist[d_h][d_w]
    if ans == 10**18:
        print(-1)
    else:
        print(ans)

resolve()

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

resolve()

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi loves takoyaki - a ball-shaped snack.  With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make.  How long does it take to make N takoyaki?

Submission attempts (in order):
N,X,T=map(int, input().split())
if N%X==0:
  print(N/X*T)
  else:
  print((int(N/X)+1)*T)
  

N,X,T=map(int, input().split())
if N%X==0:
  print(int(N/X*T))
else:
  print((int(N/X)+1)*T)

Verdicts: Runtime Error

Accepted