problem_id
stringclasses
428 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
5
816
p02784
s451454140
Accepted
h,n = map(int,input().split()) a = list(map(int,input().split())) print("YNeos"[sum(a)<h::2])
p03351
s104290985
Accepted
a, b, c, d = map(int, input().split()) if (abs(a-b)<=d and abs(c-b)<=d) or (abs(a-c)<=d): print("Yes") else: print("No")
p02755
s719054538
Wrong Answer
A, B = map(int, input().split()) A = 100 * A B = 100 * B a = 0 b = 0 for i in range(A, A+100): a = i / 8 for j in range(B, B+100): b = j /10 if a == b: print(int(a)) break else: if i == A +99: print("-1") else: continue break
p03659
s019731623
Wrong Answer
n = int(input()) a = list(map(int, input().split())) a.sort() total = sum(a) b = 0 c = total ans = 10 ** 9 for i in range(n-1): b = b + a[i] c = total - b ans = min(ans, abs(b - c)) print(ans)
p03944
s462480223
Wrong Answer
w,h,n = map(int, input().split()) l,r,d,u = (0,w,0,h) for i in range(n): x,y,a = map(int, input().split()) if a == 1: l = max(l,x) elif a == 2: r = min(r,x) elif a == 3: d = max(d,y) else: u = min(u,y) print(max((r-l)*(u-d),0))
p02818
s589767885
Accepted
A, B, K = map(int, input().split()) d = min(A, K) #print('d:', d) A -= d K -= d d = min(B, K) #print('d:', d) B -= d K -= d print(A, B)
p03838
s025470922
Accepted
x, y = map(int,input().split()) if x * y == 0: if x <= y: print(y - x) elif x > y: print(x - y + 1) elif x * y > 0: if x <= y: print(y - x) elif x > y: print(x - y + 2) elif x * y < 0: if abs(x) <= abs(y): print(abs(y) - abs(x) + 1) elif abs(x) > abs(y): print(abs(x) - abs(y) + 1)
p03264
s578742908
Accepted
k = int(input()) if k%2 == 0: print(k//2*k//2) else: print(k//2*(k//2+1))
p03486
s135442631
Accepted
s, t = list(input() for i in range(2)) print("Yes" if sorted(s) < sorted(t)[::-1] else "No")
p02602
s887343435
Wrong Answer
def s(): return input() def i(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def X(): return list(input()) def L(): return list(input().split()) def l(): return list(map(int,input().split())) count = 0 ans = "No" N,K = I() A = l() before = 1 for i in range(N-K): after = before / A[i] * A[K+i] if after > before: print("Yes") else: print("No") before = after
p03657
s221760060
Accepted
A,B = map(int, input().split()) print('Possible' if A%3 == 0 or B%3 == 0 or (A+B)%3 == 0 else 'Impossible')
p02761
s752834830
Accepted
n, m = map(int, input().split()) x = [-1] * n for _ in range(m): s, c = map(int, input().split()) s -= 1 if x[s] != -1 and x[s] != c: print(-1) quit() x[s] = c if n > 1 and x[0] == 0: print(-1) quit() if x[0] == -1: x[0] = 1 if n > 1 else 0 for i in range(1, n): if x[i] == -1: x[i] = 0 print(''.join(map(str, x)))
p02576
s169767628
Accepted
n, x, t = map(int, input().split()) print((n + x - 1) // x * t)
p03730
s821510342
Accepted
A,B,C=map(int,input().split()) R_lis = [-1]*(B) for i in range (B): R_lis[i] = A*(i+1)%B if C in R_lis: print("YES") else: print("NO")
p03449
s100159907
Accepted
import numpy as np import sys sys.setrecursionlimit(10 ** 5 + 10) # input = sys.stdin.readline def resolve(): N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split()))[::-1] from itertools import accumulate AA = list(accumulate([0] + A))+[0] # 累積和を格納したリスト作成 BB = (list(accumulate([0] + B))+[0])[::-1] # 累積和を格納したリスト作成 sumlist=np.array(AA)+np.array(BB) print(max(sumlist)) resolve()
p03545
s694408966
Wrong Answer
import itertools num = str(input()) sign = ("+", "-") for s1, s2, s3 in itertools.product(sign, repeat=3): result = num[0] + s1 + num[1] + s2 + num[2] + s3 + num[3] if eval(result) == 7: print(result) break
p02647
s391915363
Accepted
n, k = map(int, input().split()) a = list(map(int, input().split())) def move(): global a s = [0] * (n + 1) for i in range(n): s[max(0, i - a[i])] += 1 s[min(n, i + a[i] + 1)] -= 1 for i in range(1, n + 1): s[i] += s[i - 1] if all(map(lambda i: a[i] == s[i], range(n))): return True a = s return False for _ in range(k): if move(): break print(*a[:n])
p02802
s566724674
Accepted
import sys input = sys.stdin.readline import itertools N,M = map(int,input().split()) a=[tuple(map(str,input().split())) for _ in range(M)] ac = [0]*N wa = [0]*N for i in range(M): q = int(a[i][0])-1 res = a[i][1] if res == 'AC': ac[q] = 1 else: if ac[q] == 0: wa[q] += 1 wa2=0 for i in range(N): if ac[i]==1: wa2 += wa[i] print("{} {}".format(sum(ac),wa2))
p02767
s650673881
Accepted
n = int(input()) x = list(map(int,input().split(" "))) x_max = max(x) x_min = min(x) l =[] for i in range(x_min,x_max + 1): si = 0 for j in range(n): xj = x[j] xj_p = (xj - i) ** 2 si += xj_p l.append(si) l.sort() print(l[0])
p04020
s190172013
Accepted
N, *A = map(int, open(0).read().split()) r = 0 ans = 0 for a in A: if a == 0: r = 0 continue q, r = divmod(a + r, 2) ans += q print(ans)
p02595
s176494222
Wrong Answer
N,M=list(map(int,input().split())) ans=0 for u in range(N): a,b=map(int,input().split()) S=a*a+b*b if M*M<=S: ans+=1 print(ans)
p02760
s305469593
Wrong Answer
al = [map(int, input().split()) for i in range(3)] n = int(input()) bl = [int(input()) for i in range(n)] check = [0 for i in range(9)] for b in bl: if b in al: check[al.index(b)] = 1 if [1,1,1] in [check[:3], check[3:6], check[6:], check[0:7:3], check[1:8:3], check[2:9:3], check[0:9:4], check[3:8:2]]: print("Yes") else: print("No")
p02640
s657293712
Accepted
import math import sys from collections import deque import heapq import copy import itertools from itertools import permutations def mi() : return map(int,sys.stdin.readline().split()) def ii() : return int(sys.stdin.readline().rstrip()) def i() : return sys.stdin.readline().rstrip() a,b=mi() if b%2==1: print("No") sys.exit() if 2*a<=b<=4*a: print("Yes") else: print("No")
p02553
s378900185
Accepted
import numpy as np a, b, c, d = map(int, input().split()) x = np.array([a, b]) y = np.array([c, d]) z = np.outer(x, y) print(z.max())
p02838
s006752009
Accepted
import sys ## io ## def IS(): return sys.stdin.readline().rstrip() def II(): return int(IS()) def MII(): return list(map(int, IS().split())) def MIIZ(): return list(map(lambda x: x-1, MII())) import numpy as np #======================================================# MOD=10**9+7 def main(): n = II() aa = np.array(MII()) ans = 0 for i in range(60): cnt1 = int((aa&1).sum()) ans += cnt1*(n-cnt1)*(2**i) aa >>= 1 print(ans%MOD) if __name__ == '__main__': main()
p02911
s099197296
Wrong Answer
# -*- coding: utf-8 -*- """ Created on Thu Mar 12 22:54:45 2020 @author: Kanaru Sato """ n,k,q = list(map(int, input().split())) dict = {} for i in range(q): ans = input() if ans not in dict: dict[ans] = 1 else: dict[ans] += 1 points = [] for i in range(1,n+1): if str(i) in dict and dict[str(i)]+k-q>0: points.append("Yes") else: points.append("No") for i in range(n): print(points[i])
p02641
s392731026
Accepted
X, N = map(int,input().split()) if N == 0: print(X) else: q = list(map(int,input().split())) q = list(set(q)) p = [i for i in range(-2 , 102)] for i in range(len(q)): p.remove(q[i]) S = 103 for i in range(len(p)): if abs(X - p[i]) < S : ans = p[i] S = X - ans elif abs(X - p[i]) == S : if p[i] < ans : ans = p[i] print(ans)
p02759
s574820765
Accepted
n = int(input()) print(n//2+n%2)
p03673
s340901198
Accepted
import collections n,rev = int(raw_input()) ,False class Node(object): def __init__(self, val): self.val = val self.next, self.prev = None, None for i,ai in enumerate(map(int, raw_input().split())): node = Node(ai) if i == 0: head,tail = node,node else: if rev: head.prev, node.next = node, head head = node else: tail.next, node.prev = node, tail tail = node rev ^= True cur = head if not(rev) else tail while(cur): print cur.val, cur = cur.next if not(rev) else cur.prev
p03339
s160168249
Wrong Answer
N=int(input()) S=input() ans=S.count("W") for i in range(N): if S[i]=="W": ans-=1 if i!=0: if S[i-1]=="E": ans+=1 if i!=0: ans1=max(ans,ans1) else: ans1=ans print(ans) print(N-1-ans1)
p03986
s471192097
Wrong Answer
S = input() N = len(S) t_cnt = 0 s_cnt = 0 for i in range(N): if S[i] == 'T': t_cnt += 1 else: break for i in range(N): if S[N-1-i] == 'S': s_cnt += 1 else: break print(max(t_cnt,s_cnt) * 2)
p02971
s335154053
Wrong Answer
n=int(input()) v=[int(input()) for i in range(n)] t=sorted(v) for i in v: print(t[1] if i==t[0] else t[0])
p03951
s603019354
Wrong Answer
n = int(input()) s = input() t = input() ans = s + t for i in range(n): is_same = True for j in range(i, n): if s[j] != t[j - i]: is_same = False break if is_same: ans = s[:i] + t print(len(ans))
p02767
s656579008
Wrong Answer
n = int(input()) x_list = list(map(int,input().split())) ans = 0 x_sum = sum(x_list) // n + 1 for x in x_list: ans += (x-x_sum)**2 continue print(ans)
p03001
s117891724
Accepted
W,H,x,y=map(int,input().split()) S=W*H/2 if x+x==W and y+y==H: ans=1 else: ans=0 print(str('{:.10f}'.format(S))+' '+str(ans))
p03262
s316049162
Wrong Answer
import math N, X = map(int, input().split()) x = list(map(int,input().split())) x.append(X) x.sort() if N==1: ans = x[1]-x[0] else: for i in range(N-1): ans = math.gcd(x[i+1]-x[i], x[i+2]-x[i+1]) print(ans)
p03711
s479757503
Accepted
x, y = list(map(int, input().split())) group = 0 a = [0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1] if a[x] == a[y]: print("Yes") else: print("No")
p03838
s380832823
Accepted
x,y = map(int,input().split()) if ((x >= 0 and y >= 0) or (x < 0 and y < 0)) and x < y: print(abs(x-y)) elif (x >= 0 and y >= 0) and y < x: print(abs(x-y+1+(y != 0))) elif (x < 0 and y < 0) and y < x: print(abs(x-y)+2) elif x == -y: print(1) else: print(abs(abs(x)-abs(y))+(y != 0))
p02711
s370552643
Accepted
a = input() if "7" in a: print("Yes") else: print("No")
p02766
s215795943
Accepted
n, k = map(int, input().split()) count = 1 while n // k > 0: n = n // k count += 1 print(count)
p03309
s553574306
Accepted
import numpy as np n = int(input()) a = [int(i)- k-1 for k,i in enumerate(input().split())] ans = 10**9 a = np.array(a,dtype = 'int64') median = int(np.median(a)) print(np.sum(np.abs(a-median)))
p03239
s752561291
Wrong Answer
n, t = map(int, input().split()) ans = float('inf') for _ in range(n): x, y = map(int, input().split()) if y <= t: ans = min(ans, x) print(ans)
p03767
s123556641
Accepted
n = int(input()) a = list(map(int, input().split())) ans = 0 a.sort() for i in range(1, n+1) : ans += a[-2*i] print(ans)
p02602
s062561626
Accepted
N, K = map(int, input().split()) A = list(map(int, input().split())) for i in range(N-K): # print(A[i], A[i+K]) if A[i] < A[i+K]: print("Yes") else: print("No")
p03854
s651442987
Wrong Answer
S = input() ls = {"dream","dreamer","erase","eraser"} now = "" for i in range(len(S)): now += S[i] if now in ls: now = "" if now == "": print("YES") else: print("NO")
p02818
s330903195
Accepted
a, b, k = map(int, input().split()) if a >= k: c = a-k e = "{0} {1}".format(c, b) print(e) elif a < k <= a + b: c = b + a - k e = "{0} {1}".format(0, c) print(e) else: print('0' +' ' + '0')
p03012
s734543257
Wrong Answer
n = int(input()) w = list(map(int, input().split())) total = sum(w) s1 = [0]*(n-1) s2 = [0]*(n-1) for i in range(n-1): s1[i] = sum(w[0:i]) s2[i] = total - s1[i] d = [0] * (n-1) for i in range(n-1): d[i] = abs(s1[i] - s2[i]) print(min(d))
p02924
s506103864
Accepted
n = int(input()) print(n * (n-1) // 2)
p03951
s978503670
Accepted
n = int(input()) s = input() t = input() ans = n for i in range(n): if s[i:] == t[:n-i]: print(ans) exit() ans +=1 print(ans)
p02801
s748615441
Accepted
# -*- coding: utf-8 -*- c = input() print(c.translate(str.maketrans("abcdefghijklmnopqrstuvwxy", "bcdefghijklmnopqrstuvwxyz")))
p03637
s578617596
Wrong Answer
n = int(input()) a = list(map(int,input().split())) codd = 0 cfour = 0 for i in range(n): if a[i]%4 == 1 or a[i]%4 == 3: codd += 1 if a[i]%4 == 0: cfour += 1 if cfour == codd: print('Yes') else: print('No')
p03448
s711161352
Accepted
A = int(input()) B = int(input()) C = int(input()) X = int(input()) ans = 0 for i in range(A+1): for j in range(B+1): for k in range(C+1): if (500*i + 100*j + 50*k) ==X: ans += 1 print(ans)
p02687
s757084937
Accepted
S=input() if S=="ABC": print("ARC") else: print("ABC")
p02700
s025135902
Accepted
a,b,c,d = map(int,input().split()) for i in range(100): c -= b if c <=0: ans = 'Yes' break a -= d if a <= 0: ans = 'No' break print(ans)
p03360
s325213061
Wrong Answer
a = sorted(list(map(int, input().split()))) k = int(input()) a[-1] = 2*k*a[-1] print(sum(a))
p02742
s082009013
Accepted
h, w= list(map(int, input().split())) if h == 1 or w == 1: print(1) else: ans = h*w/2 if ans == int(ans): print(int(ans)) else: print(int(ans + 0.5))
p03657
s868295988
Wrong Answer
a,b=map(int,input().split()) if a%3==0 or b%3==0 or a+b%3==0: print("Possible") else: print("Impossible")
p02660
s960600910
Wrong Answer
N=int(input()) def divisor(n): i = 1 table = [] while i * i <= n: if n%i == 0: table.append(i) table.append(n//i) i += 1 table = sorted(list(set(table))) return table[1:] lis=divisor(N) count=0 for z in lis: if N % z ==0: N=N/z count+=1 print(count)
p03069
s322759675
Accepted
n = int(input()) s = input() right, left = 0, s.count('.') r = [left] for i in range(n): if s[i]=='#': right += 1 else: left -= 1 r.append(right+left) print(min(r))
p02621
s654733361
Wrong Answer
a=2 b=a+a^2+a^3 print(b)
p02747
s730315185
Accepted
s = input() if s == 'hi' * int(len(s)//2): print('Yes') else: print('No')
p02866
s839554864
Accepted
n = int(input()) a = list(map(int,input().split())) ans = 1 mod = 998244353 if a[0] !=0: ans = 0 cnt = [0]*n for i in range(n): cnt[a[i]] += 1 for i in range(1,n): ans *= cnt[a[i]-1] ans %= mod print(ans)
p02759
s691924467
Accepted
N = int(input()) print(N // 2 if N % 2 == 0 else N // 2 + 1)
p03043
s452552831
Accepted
N, K = map(int,input().split()) def probability(p): if p >= K: return 1 cnt = 0 while(p < K): p = p * 2 cnt += 1 return 1 / (2 ** cnt) ans = 0 for i in range(1, N+1): ans += probability(i) ans /= N print(ans)
p02578
s563696995
Accepted
n = int(input()) a = list(map(int,input().split())) max = 0 sum = 0 for i in range(n): if a[i] > max: max = a[i] else: sum += (max - a[i]) print(sum)
p02910
s299339498
Wrong Answer
s = input() for i, s_ in enumerate(s, 1): if not (i%2==1) and (s_ in ['R', 'U', 'D']): print('No') exit() if not (i%2==0) and (s_ in ['L', 'U', 'D']): print('No') exit() print('Yes')
p03286
s689884983
Wrong Answer
# https://atcoder.jp/contests/abc105/tasks/abc105_c # -2進数 # 前に考えたときはわからなかったけど、数式イジイジしたら解けた N = int(input()) ans = '' while N != 0: if N & 1: # 奇数ならbitが立つのは共通する性質 ans += '1' N /= -2 if N > 0: N += 1 N = int(N) else: ans += '0' N //= -2 print(ans[::-1])
p03360
s642481290
Accepted
ABC=list(map(int,input().split(' '))) K=int(input()) print(sum(ABC)-max(ABC)+max(ABC)*pow(2,K))
p03328
s485096955
Accepted
a,b = map(int, input().split()) ans = (b-a)*(b-a+1)//2 - b print(ans)
p02743
s260583292
Accepted
a, b, c = map(int, input().split()) if 4 * a * b < (c - a - b) ** 2 and c - a - b > 0: print('Yes') else: print('No')
p02552
s423063189
Accepted
x = int(input()) if x==0: print(1) else: print(0)
p03323
s413605474
Accepted
import sys stdin = sys.stdin mod = 1000000007 inf = 1 << 60 ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().rstrip() nas = lambda: stdin.readline().split() a, b = na() if a > 8 or b > 8: print(":(") else: print("Yay!")
p03449
s427286505
Accepted
N = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) ans = a[0] + sum(b) for i in range(1, N): temp = sum(a[:i + 1]) + sum(b[i:]) ans = max(ans, temp) print(ans)
p03250
s160358371
Accepted
print(eval("+".join(sorted(input()))+"*10"))
p02729
s393381413
Wrong Answer
N,M=map(int,input().split()) print(N*(N-1)/2+M*(M-1)/2)
p03086
s989606457
Accepted
S = input() cnt = 0 results = [] for i in range(len(S)): if S[i] in ['A', 'C', 'G', 'T']: cnt += 1 else : results.append(cnt) cnt = 0 results.append(cnt) print(max(results))
p03778
s944276552
Accepted
w, a, b = map(int, input().split()) if abs(a - b) <= w: print(0) else: print(abs(a - b) - w)
p02861
s478660822
Accepted
from itertools import permutations N = int(input()) xlist = [] ylist = [] n = 1 for i in range(1, N+1): x, y = map(int, input().split()) xlist.append(x) ylist.append(y) n *= i ans = 0 for perm in permutations(range(N)): for i in range(N-1): x1, y1 = xlist[perm[i]], ylist[perm[i]] x2, y2 = xlist[perm[i+1]], ylist[perm[i+1]] ans += ((x1 - x2)**2 + (y1 - y2)**2)**0.5 / n print(ans)
p02688
s190718976
Accepted
n,k = map(int,input().split()) ALL=[] for i in range(k): d=int(input()) A = list(map(int,input().split())) for ii in range(d): ALL.append(A[ii]) ans=list(set(list(range(1,n+1))) - set(ALL)) print(len(ans))
p03385
s058015178
Accepted
s=input() a=0 b=0 c=0 for i in range(3): if s[i]=="a": a+=1 elif s[i]=="b": b+=1 elif s[i]=="c": c+=1 if a==1 and b==1 and c==1: print("Yes") else: print("No")
p03219
s494949565
Accepted
X, Y = map(int, input().split()) print(X+(Y//2))
p03543
s679360573
Accepted
n = input() for i in range(2): if n[i] == n[i+1] and n[i+1] == n[i+2]: print("Yes") exit() print("No")
p03146
s334929200
Accepted
s = int(input()) l = [s] ans = True while ans: m = len(l) if l[m - 1] % 2 == 0: l.append(l[m - 1] // 2) else: l.append(3 * l[m - 1] + 1) for i in range(m): if l[i] == l[m]: print(m + 1) ans = False
p02647
s815181120
Accepted
def main(): n, k = map(int, input().split()) a = list(map(int, input().split())) for _ in range(k): imos = [0] * (n + 1) for i in range(n): imos[max(0, i - a[i])] += 1 imos[min(n, i + a[i] + 1)] -= 1 for i in range(1, n): imos[i] += imos[i-1] imos.pop() a = imos if min(a) == n: break print(*a) main()
p03211
s330629956
Accepted
def main(): S = input() ans = 1000 for i in range(len(S)-2): tmp = abs(int(S[i:i+3]) - 753) if tmp < ans: ans = tmp print(ans) if __name__ == "__main__": main()
p03250
s317279395
Accepted
import sys input = sys.stdin.readline def main(): A, B, C = input().split() ans = max(int(A + B) + int(C), int(B + C) + int(A), int(C + A) + int(B)) print(ans) if __name__ == "__main__": main()
p03623
s436885794
Accepted
X, A, B = map(int, input().split()) D = {abs(X-A):"A", abs(X-B):"B"} print(D[min(abs(X-A), abs(B-X))])
p03282
s540375181
Accepted
#106_C S=input() K=int(input()) ans=0 for i in range(len(S)): if S[i]!='1': ans=i break print('1' if K<=ans else S[ans])
p02603
s278779593
Wrong Answer
N = int(input()) a = list(map(int,input().split())) S = 1000 K = 0 b = 1 last = 0 for i in range(N): if i != N-1: if a[i]<=a[i+1]: K = S // a[i] S -= K*a[i] last = i if a[i]>a[i+1]: S += a[i]*K K = 0 else: if a[i]<=a[last]: S += a[last]*K else: S += a[i]*K print(S)
p02777
s879377907
Wrong Answer
color=input().split() x,y=map(int,input().split()) color2=input() if color2==color[0]: print(x-1) else: print(y-1)
p03607
s828082063
Accepted
N = int(input()) s = set() for i in range(N): s ^= {int(input())} print(len(s))
p02972
s588006792
Accepted
n=int(input()) a=[0]+list(map(int,input().split())) m=0 ans=[] c=[0]*(n+1) for i in reversed(range(1,n+1)): if a[i]%2!=c[i]%2: m+=1 ans.append(i) j=1 r=set() while j*j<=i: if i%j==0: r.add(j) r.add(i//j) j+=1 for j in r: c[j]+=1 c[j]%=2 print(m) print(*sorted(ans))
p02765
s856650741
Wrong Answer
N, R = map(int, input().split()) print(R if 10>=N else R-100*(10-N))
p02842
s283693024
Accepted
N = int(input()) for X in range(1, N+1): if X*108//100==N: print(X) break else: print(':(')
p02725
s068849531
Wrong Answer
from collections import deque k,n = map(int,input().split()) a = deque(list(map(int,input().split()))) b = [] for i in range(n): b.append(a[i]-k) b = deque(reversed(sorted(b))) for i in range(n): a.appendleft(abs(b[i])) a = list(a) x = [] sa = [] #print(a) sb = [] for i in range(len(a)): sa.append(sum(a[:i+1])) for i in range(len(a)-n): sb.append(sa[i+n]-sa[i]) print(min(sb))
p03220
s122118941
Accepted
n = int(input()) t,a= map(int, input().split()) l = list(map(int, input().split())) x = t - l[0] * 0.006 tmp = [] for x in l: x = t - x * 0.006 tmp.append(x) ans = [] for z in tmp: y = a - z ans.append(abs(y)) print(ans.index(min(ans)) + 1)
p03059
s094626333
Accepted
import sys def S(): return sys.stdin.readline().rstrip() A,B,T = map(int,S().split()) print(T//A*B)
p02606
s653308352
Accepted
L,R,D = map(int,input().rstrip().split(" ")) ans = 0 for i in range(L,R+1): if i % D == 0: ans += 1 print(ans)
p03543
s004496283
Wrong Answer
a, b, c, d, = input() print("Yes" if "a"=="b"=="c" or "b"=="c"=="d" else "No")
p02777
s292149354
Wrong Answer
s,t =map(str,input().split()) a,b =map(int,input().split()) u=input() if u==s: print(a-1) else: print(b-1)