message
stringlengths
2
43.5k
message_type
stringclasses
2 values
message_id
int64
0
1
conversation_id
int64
853
107k
cluster
float64
24
24
__index_level_0__
int64
1.71k
214k
Provide tags and a correct Python 3 solution for this coding contest problem. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he failed to solve the last task after some conside...
instruction
0
21,365
24
42,730
Tags: greedy Correct Solution: ``` n = int(input()) s = set(map(int,input().split())) cnt = 0 for i in s: if i <= n: cnt+=1 print(n-cnt) ```
output
1
21,365
24
42,731
Provide tags and a correct Python 3 solution for this coding contest problem. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he failed to solve the last task after some conside...
instruction
0
21,366
24
42,732
Tags: greedy Correct Solution: ``` n=int(input()) a=[int(x) for x in input().split()] ss=[0]*(n+1) cnt=0 for i in a: if i<=n: if ss[i]: cnt+=1 else: ss[i]=1 else: cnt+=1 print(cnt) ```
output
1
21,366
24
42,733
Provide tags and a correct Python 3 solution for this coding contest problem. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he failed to solve the last task after some conside...
instruction
0
21,367
24
42,734
Tags: greedy Correct Solution: ``` n=int(input()) l1=[int(i) for i in input().split()] l2=[] c=0 for i in l1: if i not in l2 and i<=n: l2.append(i) elif i in l2 and i<=n: c+=1 elif i>n: c+=1 print(c) ```
output
1
21,367
24
42,735
Provide tags and a correct Python 3 solution for this coding contest problem. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he failed to solve the last task after some conside...
instruction
0
21,368
24
42,736
Tags: greedy Correct Solution: ``` n=int(input()) s=[int(i) for i in input().split() if int(i)<=n] t=len(set(s)) print(n-t) ```
output
1
21,368
24
42,737
Provide tags and a correct Python 3 solution for this coding contest problem. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he failed to solve the last task after some conside...
instruction
0
21,369
24
42,738
Tags: greedy Correct Solution: ``` N = int(input()) A = list(int(i) for i in input().split()) S = set() for k in A: if(1<=k and k<=N): S.add(k) print(N-len(S)) ```
output
1
21,369
24
42,739
Provide tags and a correct Python 3 solution for this coding contest problem. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he failed to solve the last task after some conside...
instruction
0
21,370
24
42,740
Tags: greedy Correct Solution: ``` #from collections import deque,namedtuple def main(): n = int(input()) s = set([int(i) for i in range(1,n+1)]) for i in input().split(): if int(i) in s: s.remove(int(i)) print(len(s)) if __name__ == "__main__": main() ```
output
1
21,370
24
42,741
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he f...
instruction
0
21,371
24
42,742
Yes
output
1
21,371
24
42,743
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he f...
instruction
0
21,372
24
42,744
Yes
output
1
21,372
24
42,745
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he f...
instruction
0
21,373
24
42,746
Yes
output
1
21,373
24
42,747
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he f...
instruction
0
21,374
24
42,748
Yes
output
1
21,374
24
42,749
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he f...
instruction
0
21,375
24
42,750
No
output
1
21,375
24
42,751
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he f...
instruction
0
21,376
24
42,752
No
output
1
21,376
24
42,753
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he f...
instruction
0
21,377
24
42,754
No
output
1
21,377
24
42,755
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. "Hey, it's homework time" — thought Polycarpus and of course he started with his favourite subject, IT. Polycarpus managed to solve all tasks but for the last one in 20 minutes. However, as he f...
instruction
0
21,378
24
42,756
No
output
1
21,378
24
42,757
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them reposted the reposts and so on. These events ...
instruction
0
21,586
24
43,172
Tags: *special, dfs and similar, dp, graphs, trees Correct Solution: ``` n = int(input()) d = {} d["polycarp"] = 1 ans = 1 for i in range(n): s = input() a = s.split() a[0] = a[0].lower() a[2] = a[2].lower() d[a[0]] = d[a[2]] + 1 ans = max(ans, d[a[0]]) print(ans) ```
output
1
21,586
24
43,173
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them reposted the reposts and so on. These events ...
instruction
0
21,587
24
43,174
Tags: *special, dfs and similar, dp, graphs, trees Correct Solution: ``` #*special problem----dfs and similar-----dp------graphs------trees-------*1700 class Edge(object): def __init__(self, src, dest): self.src=src self.dest=dest def getSource(self): return self.src def g...
output
1
21,587
24
43,175
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them reposted the reposts and so on. These events ...
instruction
0
21,588
24
43,176
Tags: *special, dfs and similar, dp, graphs, trees Correct Solution: ``` # Anuneet Anand n = int(input()) G = {"polycarp":1} for i in range(n): X = list(input().split()) a = X[0].lower() b = X[2].lower() if b in G: G[a]=G[b]+1 else: G[a]=1 print(max(G.values())) ```
output
1
21,588
24
43,177
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them reposted the reposts and so on. These events ...
instruction
0
21,589
24
43,178
Tags: *special, dfs and similar, dp, graphs, trees Correct Solution: ``` n = int(input()) pairs = [] idx = dict() count = 0 for _ in range(n): a, b, c = map(lambda x: x.lower(), input().split()) if a not in idx: idx[a] = count count += 1 if c not in idx: idx[c] = count coun...
output
1
21,589
24
43,179
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them reposted the reposts and so on. These events ...
instruction
0
21,590
24
43,180
Tags: *special, dfs and similar, dp, graphs, trees Correct Solution: ``` import sys from collections import defaultdict as dd def read(): return sys.stdin.readline().strip() def write(a): sys.stdout.write(a) def dfs(d, u, v, cnt): if v[u] == True: return cnt v[u] = True ans = cnt for i i...
output
1
21,590
24
43,181
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them reposted the reposts and so on. These events ...
instruction
0
21,591
24
43,182
Tags: *special, dfs and similar, dp, graphs, trees Correct Solution: ``` n = int(input()) a = {} a['polycarp'] = 1 for i in range(n): x = input().split() a[x[0].lower()] = a[x[2].lower()] + 1 print(max(a.values())) ```
output
1
21,591
24
43,183
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them reposted the reposts and so on. These events ...
instruction
0
21,592
24
43,184
Tags: *special, dfs and similar, dp, graphs, trees Correct Solution: ``` n = int(input()) a = {'polycarp':-1} for i in range(n): b = input().lower().split() a[b[0]] = b[2] ans = 0 for i in a: t = 0 s = i while s!=-1: t+=1 s = a[s] if t>ans: ans = t print(ans) ```
output
1
21,592
24
43,185
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them reposted the reposts and so on. These events ...
instruction
0
21,593
24
43,186
Tags: *special, dfs and similar, dp, graphs, trees Correct Solution: ``` from collections import defaultdict, deque n = int(input()) graph = defaultdict(list) visited = set() longest = defaultdict(int) persons = set() for _ in range(n): (x, _, y) = input().strip().split() graph[y.lower()].append(x.lower()) ...
output
1
21,593
24
43,187
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them...
instruction
0
21,594
24
43,188
Yes
output
1
21,594
24
43,189
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them...
instruction
0
21,595
24
43,190
Yes
output
1
21,595
24
43,191
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them...
instruction
0
21,596
24
43,192
Yes
output
1
21,596
24
43,193
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them...
instruction
0
21,597
24
43,194
Yes
output
1
21,597
24
43,195
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them...
instruction
0
21,598
24
43,196
No
output
1
21,598
24
43,197
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them...
instruction
0
21,599
24
43,198
No
output
1
21,599
24
43,199
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them...
instruction
0
21,600
24
43,200
No
output
1
21,600
24
43,201
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp published a funny picture in a social network making a poll about the color of his handle. Many of his friends started reposting Polycarp's joke to their news feed. Some of them...
instruction
0
21,601
24
43,202
No
output
1
21,601
24
43,203
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch Tufurama season 3 episode 7 online...
instruction
0
22,583
24
45,166
Tags: data structures Correct Solution: ``` import os import sys from io import BytesIO, IOBase BUFSIZE = 8192 class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file.mode se...
output
1
22,583
24
45,167
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch Tufurama season 3 episode 7 online...
instruction
0
22,584
24
45,168
Tags: data structures Correct Solution: ``` from sys import stdin from sys import setrecursionlimit as SRL; SRL(10**7) rd = stdin.readline rrd = lambda: map(int, rd().strip().split()) n = int(rd()) a = list(rrd()) bit = [0] * (n+10) def get(x): tot = 0 while x: tot += bit[x] x -= x&(-x) ...
output
1
22,584
24
45,169
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch Tufurama season 3 episode 7 online...
instruction
0
22,585
24
45,170
Tags: data structures Correct Solution: ``` import types _atcoder_code = """ # Python port of AtCoder Library. __all__ = ["string","lazysegtree","convolution","maxflow","modint" ,"mincostflow","segtree","_scc","_math","math","dsu","twosat","fenwicktree","scc","_bit","lca","unverified","graph","matrix","algebra","c...
output
1
22,585
24
45,171
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch Tufurama season 3 episode 7 online...
instruction
0
22,586
24
45,172
Tags: data structures Correct Solution: ``` from bisect import bisect_left, bisect_right n = int(input()) a = list(map(int, input().split())) ans = 0 #ans = slow_test() class fenwick(): """ This Tree Data Structure speeds up caliculating summations of partial sum and also updating subsets of sequences. ...
output
1
22,586
24
45,173
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch Tufurama season 3 episode 7 online...
instruction
0
22,587
24
45,174
Tags: data structures Correct Solution: ``` from sys import stdin from sys import setrecursionlimit as SRL; SRL(10**7) rd = stdin.readline rrd = lambda: map(int, rd().strip().split()) n = int(input()) a = list(rrd()) bit = [0]*(n+100) def ins(x): while x<=n: bit[x] += 1 x += x&(-x) def get(l): ...
output
1
22,587
24
45,175
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch Tufurama season 3 episode 7 online...
instruction
0
22,588
24
45,176
Tags: data structures Correct Solution: ``` def divisors(M): d=[] i=1 while M>=i**2: if M%i==0: d.append(i) if i**2!=M: d.append(M//i) i=i+1 return d def popcount(x): x = x - ((x >> 1) & 0x55555555) x = (x & 0x33333333) + ((x >> 2) & 0x333...
output
1
22,588
24
45,177
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch Tufurama season 3 episode 7 online...
instruction
0
22,589
24
45,178
Tags: data structures Correct Solution: ``` import bisect def lowbit(x): return(x&-x) def add(i,x): while i<=n: bit[i].append(x) i+=lowbit(i) def query(i,x): s=0 #print(i) while i>0: pos = bisect.bisect_left(bit[i],x) s+=len(bit[i])-pos i-=lowbit(i) ...
output
1
22,589
24
45,179
Provide tags and a correct Python 3 solution for this coding contest problem. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch Tufurama season 3 episode 7 online...
instruction
0
22,590
24
45,180
Tags: data structures Correct Solution: ``` import sys from collections import defaultdict class BIT_RSQ(object): __slots__ = ['nodes', 'size'] def __init__(self, size: int): self.nodes = [0]*(size+1) self.size = size+1 def add(self, index: int, value: int): while index < self.si...
output
1
22,590
24
45,181
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search que...
instruction
0
22,591
24
45,182
Yes
output
1
22,591
24
45,183
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search que...
instruction
0
22,592
24
45,184
No
output
1
22,592
24
45,185
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search que...
instruction
0
22,593
24
45,186
No
output
1
22,593
24
45,187
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search que...
instruction
0
22,594
24
45,188
No
output
1
22,594
24
45,189
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search que...
instruction
0
22,595
24
45,190
No
output
1
22,595
24
45,191
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Policarp chooses is sold for k burles. Assume that there is an unlimited number of such shovels in the shop. In his pocket Polycarp has a...
instruction
0
23,366
24
46,732
Tags: brute force, constructive algorithms, implementation, math Correct Solution: ``` inn=input() n,k=inn.split(" ") n,k=int(n),int(k) sum =1 res=n while not(res % 10 ==k or res %10 ==0) : sum+=1 res+=n print(sum) ```
output
1
23,366
24
46,733
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Policarp chooses is sold for k burles. Assume that there is an unlimited number of such shovels in the shop. In his pocket Polycarp has a...
instruction
0
23,367
24
46,734
Tags: brute force, constructive algorithms, implementation, math Correct Solution: ``` cost, coin = [int(x) for x in input().split()] def pidorskie_zadachi(cost, coin): if cost % 10 == coin or cost % 10 == 0: return True return False for i in range(1, 11): if pidorskie_zadachi(cost * i, coin): ...
output
1
23,367
24
46,735
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Policarp chooses is sold for k burles. Assume that there is an unlimited number of such shovels in the shop. In his pocket Polycarp has a...
instruction
0
23,368
24
46,736
Tags: brute force, constructive algorithms, implementation, math Correct Solution: ``` k, r = map(int,input().split()) s = k ans = 1 while s % 10 != 0 and (s - r) % 10 != 0: ans += 1 s += k if ans > 10: break print(ans) ```
output
1
23,368
24
46,737
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Policarp chooses is sold for k burles. Assume that there is an unlimited number of such shovels in the shop. In his pocket Polycarp has a...
instruction
0
23,369
24
46,738
Tags: brute force, constructive algorithms, implementation, math Correct Solution: ``` k, r = map(int, input().split()) ans = 1 sum = k while(True): if(sum % 10 == 0 or (sum - r) % 10 == 0): print(ans) break ans += 1 sum += k ```
output
1
23,369
24
46,739
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Policarp chooses is sold for k burles. Assume that there is an unlimited number of such shovels in the shop. In his pocket Polycarp has a...
instruction
0
23,370
24
46,740
Tags: brute force, constructive algorithms, implementation, math Correct Solution: ``` k , n = map(int, input().split()) for i in range(1, 11): if (k*i)%10 == n or (k*i)%10 == 0 : print(i) break ```
output
1
23,370
24
46,741
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Policarp chooses is sold for k burles. Assume that there is an unlimited number of such shovels in the shop. In his pocket Polycarp has a...
instruction
0
23,371
24
46,742
Tags: brute force, constructive algorithms, implementation, math Correct Solution: ``` a, b = list(map(int, input().split())) c = 1 while(True): if((a*c)%10 == 0 or ((a*c)-b)%10 == 0): break else: c += 1 print(c) ```
output
1
23,371
24
46,743
Provide tags and a correct Python 3 solution for this coding contest problem. Polycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Policarp chooses is sold for k burles. Assume that there is an unlimited number of such shovels in the shop. In his pocket Polycarp has a...
instruction
0
23,372
24
46,744
Tags: brute force, constructive algorithms, implementation, math Correct Solution: ``` lt=list(input().split()) price=int(lt[0]) coin=int(lt[1]) lt=[] if coin%price==0: lt.append(coin//price) if price%2==0: lt.append(5) if price%5==0: lt.append(2) if price%10==0 or (price-coin)%10==0: lt.append(1) else:...
output
1
23,372
24
46,745