message stringlengths 2 39.6k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 450 109k | cluster float64 2 2 | __index_level_0__ int64 900 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fennec is fighting with N monsters.
The health of the i-th monster is H_i.
Fennec can do the following two actions:
* Attack: Fennec chooses one monster. That monster's health will decrease b... | instruction | 0 | 84,813 | 2 | 169,626 |
Yes | output | 1 | 84,813 | 2 | 169,627 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fennec is fighting with N monsters.
The health of the i-th monster is H_i.
Fennec can do the following two actions:
* Attack: Fennec chooses one monster. That monster's health will decrease b... | instruction | 0 | 84,814 | 2 | 169,628 |
Yes | output | 1 | 84,814 | 2 | 169,629 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fennec is fighting with N monsters.
The health of the i-th monster is H_i.
Fennec can do the following two actions:
* Attack: Fennec chooses one monster. That monster's health will decrease b... | instruction | 0 | 84,815 | 2 | 169,630 |
Yes | output | 1 | 84,815 | 2 | 169,631 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fennec is fighting with N monsters.
The health of the i-th monster is H_i.
Fennec can do the following two actions:
* Attack: Fennec chooses one monster. That monster's health will decrease b... | instruction | 0 | 84,816 | 2 | 169,632 |
Yes | output | 1 | 84,816 | 2 | 169,633 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fennec is fighting with N monsters.
The health of the i-th monster is H_i.
Fennec can do the following two actions:
* Attack: Fennec chooses one monster. That monster's health will decrease b... | instruction | 0 | 84,817 | 2 | 169,634 |
No | output | 1 | 84,817 | 2 | 169,635 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fennec is fighting with N monsters.
The health of the i-th monster is H_i.
Fennec can do the following two actions:
* Attack: Fennec chooses one monster. That monster's health will decrease b... | instruction | 0 | 84,818 | 2 | 169,636 |
No | output | 1 | 84,818 | 2 | 169,637 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fennec is fighting with N monsters.
The health of the i-th monster is H_i.
Fennec can do the following two actions:
* Attack: Fennec chooses one monster. That monster's health will decrease b... | instruction | 0 | 84,819 | 2 | 169,638 |
No | output | 1 | 84,819 | 2 | 169,639 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Fennec is fighting with N monsters.
The health of the i-th monster is H_i.
Fennec can do the following two actions:
* Attack: Fennec chooses one monster. That monster's health will decrease b... | instruction | 0 | 84,820 | 2 | 169,640 |
No | output | 1 | 84,820 | 2 | 169,641 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise does not know what the box's secret is, since sh... | instruction | 0 | 85,903 | 2 | 171,806 |
Tags: brute force, math
Correct Solution:
```
r1,r2=map(int,input().split())
c1,c2=map(int,input().split())
d1,d2=map(int,input().split())
c=((c1-d1)+r2)//2
b=((r1-c1)+d2)//2
a=r1-b
d=d1-a
e={a,b,c,d}
if len(e)==4 and 10>a>0 and 10>b>0 and 10>c>0 and 10>d>0:
if a+b==r1 and c+d==r2 and a+c==c1 and b+d==c2 and a+d==... | output | 1 | 85,903 | 2 | 171,807 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise does not know what the box's secret is, since sh... | instruction | 0 | 85,904 | 2 | 171,808 |
Tags: brute force, math
Correct Solution:
```
r1,r2 = map(int,input().split())
c1,c2 = map(int,input().split())
d1,d2 = map(int,input().split())
ans = []
a = (r1+c1-d2)//2
ans.append(a)
b = r1 - a
ans.append(b)
c = c1 - a
ans.append(c)
d = d1 - a
ans.append(d)
ans = list(set(ans))
if(len(ans)<4):
print(-1)
elif(an... | output | 1 | 85,904 | 2 | 171,809 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise does not know what the box's secret is, since sh... | instruction | 0 | 85,905 | 2 | 171,810 |
Tags: brute force, math
Correct Solution:
```
r1,r2=map(int,input().split())
c1,c2=map(int,input().split())
d1,d2=map(int,input().split())
a=(r1+c1-d2)//2
b=r1-a
c=c1-a
d=c2-b
if a+d==d1 and b+c==d2 and a+b==r1 and c+d==r2 and a+c==c1 and b+d==c2 and len(set([a,b,c,d]))==4 and len(set([a,b,c,d]))==4 and max(a,b,c,d)<10... | output | 1 | 85,905 | 2 | 171,811 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise does not know what the box's secret is, since sh... | instruction | 0 | 85,906 | 2 | 171,812 |
Tags: brute force, math
Correct Solution:
```
r1,r2 = map(int,input().split())
c1,c2 = map(int,input().split())
d1,d2 = map(int,input().split())
res = [[-1]]
for i in range(1,10):
for j in range(1,10):
for k in range(1,10):
for l in range(1,10):
if i + j == r1 and i + k == c1 and... | output | 1 | 85,906 | 2 | 171,813 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise does not know what the box's secret is, since sh... | instruction | 0 | 85,907 | 2 | 171,814 |
Tags: brute force, math
Correct Solution:
```
r1,r2=map(int,input().split())
c1,c2=map(int,input().split())
d1,d2=map(int,input().split())
a=(r1+c1-d2)//2
b=c1-a
c=r1-a
d=d1-a
l={a,b,c,d}
if len(l)<4 or min(l)<1 or max(l)>9 or b+d!=r2 or a+d!=d1 or c+d!=c2:
print(-1)
else:
print(a,c)
print(b,d)
``` | output | 1 | 85,907 | 2 | 171,815 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise does not know what the box's secret is, since sh... | instruction | 0 | 85,908 | 2 | 171,816 |
Tags: brute force, math
Correct Solution:
```
def solve():
def readinput():
return map(int, input().strip().split())
r1, r2 = readinput()
c1, c2 = readinput()
d1, d2 = readinput()
for g1 in range(1, 10):
for g2 in range(1, 10):
for g3 in range(1, 10):
for ... | output | 1 | 85,908 | 2 | 171,817 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise does not know what the box's secret is, since sh... | instruction | 0 | 85,909 | 2 | 171,818 |
Tags: brute force, math
Correct Solution:
```
r1,r2 = input().split(" ")
c1,c2 = input().split(" ")
d1,d2 = input().split(" ")
r1,r2,c1,c2,d1,d2 = int(r1),int(r2),int(c1),int(c2),int(d1),int(d2)
ar1 = []
z = True
m = max(c1,c2)
if(r1+r2 == c1+c2 == d1+d2):
for n in range((r1-1)//2):
ar1.append([r1-1-n,1+n])... | output | 1 | 85,909 | 2 | 171,819 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise does not know what the box's secret is, since sh... | instruction | 0 | 85,910 | 2 | 171,820 |
Tags: brute force, math
Correct Solution:
```
r1, r2 = list(map(int, input().split()))
c1, c2 = list(map(int, input().split()))
d1, d2 = list(map(int, input().split()))
for i in range(1, 10):
for j in range(1, 10):
if i == j:
continue
for k in range(1, 10):
if i == k or j == ... | output | 1 | 85,910 | 2 | 171,821 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise d... | instruction | 0 | 85,911 | 2 | 171,822 |
Yes | output | 1 | 85,911 | 2 | 171,823 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise d... | instruction | 0 | 85,912 | 2 | 171,824 |
Yes | output | 1 | 85,912 | 2 | 171,825 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise d... | instruction | 0 | 85,913 | 2 | 171,826 |
Yes | output | 1 | 85,913 | 2 | 171,827 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise d... | instruction | 0 | 85,914 | 2 | 171,828 |
Yes | output | 1 | 85,914 | 2 | 171,829 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise d... | instruction | 0 | 85,915 | 2 | 171,830 |
No | output | 1 | 85,915 | 2 | 171,831 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise d... | instruction | 0 | 85,916 | 2 | 171,832 |
No | output | 1 | 85,916 | 2 | 171,833 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise d... | instruction | 0 | 85,917 | 2 | 171,834 |
No | output | 1 | 85,917 | 2 | 171,835 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise d... | instruction | 0 | 85,918 | 2 | 171,836 |
No | output | 1 | 85,918 | 2 | 171,837 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized by his power p_i and endurance s_i.
The heroes... | instruction | 0 | 86,720 | 2 | 173,440 |
Tags: binary search, data structures, dp, greedy, sortings, two pointers
Correct Solution:
```
def main():
t=int(input())
allans=[]
for _ in range(t):
n=int(input()) # monsters
a=readIntArr()
m=int(input()) # heroes
ps=[] # [p,s]
for __ in range(m):
... | output | 1 | 86,720 | 2 | 173,441 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized by his power p_i and endurance s_i.
The heroes... | instruction | 0 | 86,721 | 2 | 173,442 |
Tags: binary search, data structures, dp, greedy, sortings, two pointers
Correct Solution:
```
import math
from collections import Counter
import math
for _ in range(int(input())):
n = int(input())
arr = list(map(int, input().split()))
m = int(input())
d=[0]*(n+1)
for i in range(m):
u,v=ma... | output | 1 | 86,721 | 2 | 173,443 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized by his power p_i and endurance s_i.
The heroes... | instruction | 0 | 86,722 | 2 | 173,444 |
Tags: binary search, data structures, dp, greedy, sortings, two pointers
Correct Solution:
```
mod=10**9+7
import sys
sys.setrecursionlimit(10**6)
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl #c++ lowerbound bl(array,element)
from bisect import bisect_right as br ... | output | 1 | 86,722 | 2 | 173,445 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized by his power p_i and endurance s_i.
The heroes... | instruction | 0 | 86,723 | 2 | 173,446 |
Tags: binary search, data structures, dp, greedy, sortings, two pointers
Correct Solution:
```
import bisect
import sys
input=sys.stdin.readline
for _ in range(int(input())):
n=int(input())
ar=list(map(int,input().split()))
m=int(input())
po=[]
for i in range(m):
po.append(list(map(int,input... | output | 1 | 86,723 | 2 | 173,447 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized by his power p_i and endurance s_i.
The heroes... | instruction | 0 | 86,724 | 2 | 173,448 |
Tags: binary search, data structures, dp, greedy, sortings, two pointers
Correct Solution:
```
# by the authority of GOD author: manhar singh sachdev #
import os,sys
from io import BytesIO,IOBase
def cons(n,x):
xx = n.bit_length()
dp = [[0]*n for _ in range(xx)]
dp[0] = x
for i in range(1,xx):
... | output | 1 | 86,724 | 2 | 173,449 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized by his power p_i and endurance s_i.
The heroes... | instruction | 0 | 86,725 | 2 | 173,450 |
Tags: binary search, data structures, dp, greedy, sortings, two pointers
Correct Solution:
```
import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
from functools import lru_cache #use @lru_cache(None)
if os.path.exists('in.txt'): sys.stdin=open('in.txt','r')
if os.path.exists('out.txt'): ... | output | 1 | 86,725 | 2 | 173,451 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized by his power p_i and endurance s_i.
The heroes... | instruction | 0 | 86,726 | 2 | 173,452 |
Tags: binary search, data structures, dp, greedy, sortings, two pointers
Correct Solution:
```
import sys
input = sys.stdin.readline
t = int(input())
ANS = []
for _ in range(t):
n = int(input())
a = list(map(int, input().split()))
m = int(input())
ps = [list(map(int, input().split())) for _ in range(m... | output | 1 | 86,726 | 2 | 173,453 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized by his power p_i and endurance s_i.
The heroes... | instruction | 0 | 86,727 | 2 | 173,454 |
Tags: binary search, data structures, dp, greedy, sortings, two pointers
Correct Solution:
```
import sys
input = sys.stdin.readline
class RangeMinimumQuery:
def __init__(self, n, func=min, inf=float("inf")):
self.n0 = 2**(n-1).bit_length()
self.op = func
self.inf = inf
self.data = ... | output | 1 | 86,727 | 2 | 173,455 |
Provide tags and a correct Python 2 solution for this coding contest problem.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized by his power p_i and endurance s_i.
The heroes... | instruction | 0 | 86,728 | 2 | 173,456 |
Tags: binary search, data structures, dp, greedy, sortings, two pointers
Correct Solution:
```
from sys import stdin, stdout
from collections import Counter, defaultdict
pr=stdout.write
raw_input = stdin.readline
def ni():
return int(raw_input())
def li():
return list(map(int,raw_input().split()))
def pn(n... | output | 1 | 86,728 | 2 | 173,457 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized ... | instruction | 0 | 86,729 | 2 | 173,458 |
Yes | output | 1 | 86,729 | 2 | 173,459 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized ... | instruction | 0 | 86,730 | 2 | 173,460 |
Yes | output | 1 | 86,730 | 2 | 173,461 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized ... | instruction | 0 | 86,731 | 2 | 173,462 |
Yes | output | 1 | 86,731 | 2 | 173,463 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized ... | instruction | 0 | 86,732 | 2 | 173,464 |
Yes | output | 1 | 86,732 | 2 | 173,465 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized ... | instruction | 0 | 86,733 | 2 | 173,466 |
No | output | 1 | 86,733 | 2 | 173,467 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized ... | instruction | 0 | 86,734 | 2 | 173,468 |
No | output | 1 | 86,734 | 2 | 173,469 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized ... | instruction | 0 | 86,735 | 2 | 173,470 |
No | output | 1 | 86,735 | 2 | 173,471 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You play a computer game. In this game, you lead a party of m heroes, and you have to clear a dungeon with n monsters. Each monster is characterized by its power a_i. Each hero is characterized ... | instruction | 0 | 86,736 | 2 | 173,472 |
No | output | 1 | 86,736 | 2 | 173,473 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly k\ \% magic essence and (100 - k)\ \% water.
In o... | instruction | 0 | 86,885 | 2 | 173,770 |
Tags: math, number theory
Correct Solution:
```
from math import gcd
for _ in range(int(input())):
k = int(input())
print(100 // gcd(k, 100 - k))
``` | output | 1 | 86,885 | 2 | 173,771 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly k\ \% magic essence and (100 - k)\ \% water.
In o... | instruction | 0 | 86,886 | 2 | 173,772 |
Tags: math, number theory
Correct Solution:
```
import math
for _ in range(int(input())):
print('%d' % (100 / math.gcd(int(input()), 100)))
``` | output | 1 | 86,886 | 2 | 173,773 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly k\ \% magic essence and (100 - k)\ \% water.
In o... | instruction | 0 | 86,887 | 2 | 173,774 |
Tags: math, number theory
Correct Solution:
```
print(*list([0, 100, 50, 100, 25, 20, 50, 100, 25, 100, 10, 100, 25, 100, 50, 20, 25, 100, 50, 100, 5, 100, 50, 100, 25, 4, 50, 100, 25, 100, 10, 100, 25, 100, 50, 20, 25, 100, 50, 100, 5, 100, 50, 100, 25, 20, 50, 100, 25, 100, 2, 100, 25, 100, 50, 20, 25, 100, 50, 100, ... | output | 1 | 86,887 | 2 | 173,775 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly k\ \% magic essence and (100 - k)\ \% water.
In o... | instruction | 0 | 86,888 | 2 | 173,776 |
Tags: math, number theory
Correct Solution:
```
import math
for _ in range(int(input())):
k=int(input())
water=100-k
c=math.gcd(water,k)
ans=0
if c==1:
print("100")
else:
water=water//c
k=k//c
print(water+k)
``` | output | 1 | 86,888 | 2 | 173,777 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly k\ \% magic essence and (100 - k)\ \% water.
In o... | instruction | 0 | 86,889 | 2 | 173,778 |
Tags: math, number theory
Correct Solution:
```
import math
for i in range(int(input())):
n=int(input())
a=100-n
b=n
if n==100:
print(1)
else:
g=math.gcd(a,b)
print(a//g+b//g)
``` | output | 1 | 86,889 | 2 | 173,779 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly k\ \% magic essence and (100 - k)\ \% water.
In o... | instruction | 0 | 86,890 | 2 | 173,780 |
Tags: math, number theory
Correct Solution:
```
import math
for _ in range(int(input())):
n = int(input())
x = math.gcd(n, 100-n)
print(n//x + (100-n)//x)
``` | output | 1 | 86,890 | 2 | 173,781 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly k\ \% magic essence and (100 - k)\ \% water.
In o... | instruction | 0 | 86,891 | 2 | 173,782 |
Tags: math, number theory
Correct Solution:
```
import math
for i in range(int(input())):
k = int(input())
print(100//math.gcd(k,100))
``` | output | 1 | 86,891 | 2 | 173,783 |
Provide tags and a correct Python 3 solution for this coding contest problem.
You have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly k\ \% magic essence and (100 - k)\ \% water.
In o... | instruction | 0 | 86,892 | 2 | 173,784 |
Tags: math, number theory
Correct Solution:
```
import math
a=int(input())
for x in range(a):
b=int(input())
if math.gcd(100,b)==1:
print(100)
else:
c=math.gcd(100,b)
print(100//c)
``` | output | 1 | 86,892 | 2 | 173,785 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
You have an initially empty cauldron, and you want to brew a potion in it. The potion consists of two ingredients: magic essence and water. The potion you want to brew should contain exactly k\ ... | instruction | 0 | 86,893 | 2 | 173,786 |
Yes | output | 1 | 86,893 | 2 | 173,787 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.