message stringlengths 2 59.7k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 37 108k | cluster float64 20 20 | __index_level_0__ int64 74 217k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
"What are your shoe sizes?"
Suddenly, the doctor asked me when I met him for the first time.
"It's 23.5"
"Oh, that's a really nice number. It's 2 to the 4th power plus 2 to the 2nd power, 2 to... | instruction | 0 | 91,638 | 20 | 183,276 |
Yes | output | 1 | 91,638 | 20 | 183,277 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
"What are your shoe sizes?"
Suddenly, the doctor asked me when I met him for the first time.
"It's 23.5"
"Oh, that's a really nice number. It's 2 to the 4th power plus 2 to the 2nd power, 2 to... | instruction | 0 | 91,639 | 20 | 183,278 |
No | output | 1 | 91,639 | 20 | 183,279 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
"What are your shoe sizes?"
Suddenly, the doctor asked me when I met him for the first time.
"It's 23.5"
"Oh, that's a really nice number. It's 2 to the 4th power plus 2 to the 2nd power, 2 to... | instruction | 0 | 91,640 | 20 | 183,280 |
No | output | 1 | 91,640 | 20 | 183,281 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
"What are your shoe sizes?"
Suddenly, the doctor asked me when I met him for the first time.
"It's 23.5"
"Oh, that's a really nice number. It's 2 to the 4th power plus 2 to the 2nd power, 2 to... | instruction | 0 | 91,641 | 20 | 183,282 |
No | output | 1 | 91,641 | 20 | 183,283 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
"What are your shoe sizes?"
Suddenly, the doctor asked me when I met him for the first time.
"It's 23.5"
"Oh, that's a really nice number. It's 2 to the 4th power plus 2 to the 2nd power, 2 to... | instruction | 0 | 91,642 | 20 | 183,284 |
No | output | 1 | 91,642 | 20 | 183,285 |
Provide tags and a correct Python 3 solution for this coding contest problem.
All bus tickets in Berland have their numbers. A number consists of n digits (n is even). Only k decimal digits d_1, d_2, ..., d_k can be used to form ticket numbers. If 0 is among these digits, then numbers may have leading zeroes. For exam... | instruction | 0 | 91,740 | 20 | 183,480 |
Tags: divide and conquer, dp, fft
Correct Solution:
```
from math import trunc
MOD = 998244353
MODF = float(MOD)
SHRT = float(1 << 16)
# Using pajenegod's crazy method for multiplication using floating point
fmod = lambda x: x - MODF * trunc(x / MODF)
mod_prod = lambda a, b: fmod(trunc(a / SHRT) * fmod(b * SHRT) + (a... | output | 1 | 91,740 | 20 | 183,481 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
All bus tickets in Berland have their numbers. A number consists of n digits (n is even). Only k decimal digits d_1, d_2, ..., d_k can be used to form ticket numbers. If 0 is among these digits,... | instruction | 0 | 91,741 | 20 | 183,482 |
No | output | 1 | 91,741 | 20 | 183,483 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
All bus tickets in Berland have their numbers. A number consists of n digits (n is even). Only k decimal digits d_1, d_2, ..., d_k can be used to form ticket numbers. If 0 is among these digits,... | instruction | 0 | 91,742 | 20 | 183,484 |
No | output | 1 | 91,742 | 20 | 183,485 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
All bus tickets in Berland have their numbers. A number consists of n digits (n is even). Only k decimal digits d_1, d_2, ..., d_k can be used to form ticket numbers. If 0 is among these digits,... | instruction | 0 | 91,743 | 20 | 183,486 |
No | output | 1 | 91,743 | 20 | 183,487 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
All bus tickets in Berland have their numbers. A number consists of n digits (n is even). Only k decimal digits d_1, d_2, ..., d_k can be used to form ticket numbers. If 0 is among these digits,... | instruction | 0 | 91,744 | 20 | 183,488 |
No | output | 1 | 91,744 | 20 | 183,489 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
Let next(x) be the mi... | instruction | 0 | 91,796 | 20 | 183,592 |
Tags: implementation
Correct Solution:
```
import sys,math
from collections import deque,defaultdict
import operator as op
from functools import reduce
from itertools import permutations
import heapq
#sys.setrecursionlimit(10**7)
# OneDrive\Documents\codeforces
I=sys.stdin.readline
alpha="abcdefghijklmnopqrstuvwxyz... | output | 1 | 91,796 | 20 | 183,593 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
Let next(x) be the mi... | instruction | 0 | 91,797 | 20 | 183,594 |
Tags: implementation
Correct Solution:
```
from bisect import bisect_left
l, r = map(int, input().split())
t, p, u, v = [4, 7], [4, 7], 4, 7
while t[-1] < r:
u, v = u * 10, v * 10
t = [u + i for i in t] + [v + i for i in t]
p.extend(t)
p = p[bisect_left(p, l): bisect_left(p, r) + 1]
print((p[0] - l + 1) * p... | output | 1 | 91,797 | 20 | 183,595 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
Let next(x) be the mi... | instruction | 0 | 91,798 | 20 | 183,596 |
Tags: implementation
Correct Solution:
```
a=10000
z=set()
for i in range(a):
x=("{:b}".format(i))
x=x.replace("1","7")
x=x.replace("0","4")
z.add(x)
for i in range(a):
x=("{:b}".format(i))
x=x.replace("0","7")
x=x.replace("1","4")
z.add(x)
z=list(z)
z=list(map(int,z))
z.sort()
l,r=map(i... | output | 1 | 91,798 | 20 | 183,597 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
Let next(x) be the mi... | instruction | 0 | 91,799 | 20 | 183,598 |
Tags: implementation
Correct Solution:
```
def mapit():
temp=list(map(int,input().split()))
return temp
import bisect
arr=[]
def rec(ch):
if ch>4444444444:
return
if ch>0:
arr.append(ch)
ch*=10
ch+=4
rec(ch)
ch+=3
rec(ch)
l,r=mapit()
rec(0)
arr.sort()
left=bisect.bisect_left(arr, l)
right=bisect.bisec... | output | 1 | 91,799 | 20 | 183,599 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
Let next(x) be the mi... | instruction | 0 | 91,800 | 20 | 183,600 |
Tags: implementation
Correct Solution:
```
from math import *
#from bisect import *
#from collections import *
#from random import *
#from decimal import *"""
#from heapq import *
#from random import *
import sys
input=sys.stdin.readline
#sys.setrecursionlimit(3*(10**5))
global flag
def inp():
return int(input())
d... | output | 1 | 91,800 | 20 | 183,601 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
Let next(x) be the mi... | instruction | 0 | 91,801 | 20 | 183,602 |
Tags: implementation
Correct Solution:
```
MAX = 10 ** 10
def doit(cur):
if cur > MAX:
return
if cur <= MAX:
a.append(cur)
doit(cur * 10 + 4)
doit(cur * 10 + 7)
a = []
doit(0)
a.sort()
ret = 0
left, right = map(int, input().split())
for i in range(len(a) - 1):
l = max(left, a[i] + ... | output | 1 | 91,801 | 20 | 183,603 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
Let next(x) be the mi... | instruction | 0 | 91,802 | 20 | 183,604 |
Tags: implementation
Correct Solution:
```
def countGreater(arr, n, k):
l = 0
r = n - 1
# Stores the index of the left most element
# from the array which is greater than k
leftGreater = n
# Finds number of elements greater than k
while (l <= r):
m = int(l + (r - l) / 2) ... | output | 1 | 91,802 | 20 | 183,605 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
Let next(x) be the mi... | instruction | 0 | 91,803 | 20 | 183,606 |
Tags: implementation
Correct Solution:
```
l,r = [int(x) for x in input().strip().split()]
def next(n,k):
s = n
n = int(n)
if int("4"*k)>=n:
return "4"*k
elif int("7"*k)<n:
return "4"*(k+1)
elif 4<int(s[0])<7:
return "7"+"4"*(k-1)
if not s[1:]=="":
a = next(s[1:],k-1)
if s[0]=="4":
if len(str(a))... | output | 1 | 91,803 | 20 | 183,607 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky... | instruction | 0 | 91,804 | 20 | 183,608 |
Yes | output | 1 | 91,804 | 20 | 183,609 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky... | instruction | 0 | 91,805 | 20 | 183,610 |
Yes | output | 1 | 91,805 | 20 | 183,611 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky... | instruction | 0 | 91,806 | 20 | 183,612 |
Yes | output | 1 | 91,806 | 20 | 183,613 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky... | instruction | 0 | 91,807 | 20 | 183,614 |
Yes | output | 1 | 91,807 | 20 | 183,615 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky... | instruction | 0 | 91,808 | 20 | 183,616 |
No | output | 1 | 91,808 | 20 | 183,617 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky... | instruction | 0 | 91,809 | 20 | 183,618 |
No | output | 1 | 91,809 | 20 | 183,619 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky... | instruction | 0 | 91,810 | 20 | 183,620 |
No | output | 1 | 91,810 | 20 | 183,621 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky... | instruction | 0 | 91,811 | 20 | 183,622 |
No | output | 1 | 91,811 | 20 | 183,623 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a square matrix n × n, consisting of non-negative integer numbers. You should find such a way on it that
* starts in the upper left cell of the matrix;
* each following cell is to the right or down from the current cell;
*... | instruction | 0 | 92,050 | 20 | 184,100 |
Tags: dp, math
Correct Solution:
```
n = int(input())
xr = range(n)
a5 = [list(map(int, input().split())) for _ in xr]
a2 = [[0 for _ in xr] for _ in xr]
y = 0
x0 = -1
for y in xr:
for x in xr:
i = a5[y][x]
m5 = 0
m2 = 0
if i == 0:
x0 = x
while... | output | 1 | 92,050 | 20 | 184,101 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a square matrix n × n, consisting of non-negative integer numbers. You should find such a way on it that
* starts in the upper left cell of the matrix;
* each following cell is to the right or down from the current cell;
*... | instruction | 0 | 92,051 | 20 | 184,102 |
Tags: dp, math
Correct Solution:
```
n = int(input())
field = []
field_two = []
field_five = []
fields = [field_two, field_five]
max_zero = 20000
zero_i = None
def make_mult(number, div, i):
global zero_i
if number == 0:
zero_i = i
return max_zero
count = 0
while number % div == 0:
... | output | 1 | 92,051 | 20 | 184,103 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a square matrix n × n, consisting of non-negative integer numbers. You should find such a way on it that
* starts in the upper left cell of the matrix;
* each following cell is to the right or down from the current cell;
*... | instruction | 0 | 92,052 | 20 | 184,104 |
Tags: dp, math
Correct Solution:
```
def solve():
n = int(input())
A = []
for _ in range(n):
A.append([int(x) for x in input().split()])
A2 = [[0 for _ in range(n)] for __ in range(n)]
A5 = [[0 for _ in range(n)] for __ in range(n)]
ans = 0; act_path = ""
for i in range(n):
for j in range(n):
if(A[i][j]... | output | 1 | 92,052 | 20 | 184,105 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a square matrix n × n, consisting of non-negative integer numbers. You should find such a way on it that
* starts in the upper left cell of the matrix;
* each following cell is to the right or down from the current cell;
*... | instruction | 0 | 92,053 | 20 | 184,106 |
Tags: dp, math
Correct Solution:
```
def solve(x,y):
z=0
while not x%y and x!=0:
z+=1
x=x//y
return z
def main():
n=int(input())
m_2=[list(map(int,input().split())) for _ in range(n)]
m_5=[[0 for _ in range(n)] for _ in range(n)]
x=(-1,-1)
for i in range(n):
for j... | output | 1 | 92,053 | 20 | 184,107 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell in the following way: the least significant bit... | instruction | 0 | 92,131 | 20 | 184,262 |
Tags: implementation
Correct Solution:
```
n=int(input())
x=input()
s="0b"+x[::-1]
s=bin(int(s,2)+1)[2:]
if len(s)>n:
s=s[1:]
elif len(s)<n:
d=n-len(s)
s="0"*d+s
s=s[::-1]
c=0
for i in range(n):
if s[i]!=x[i]:
c+=1
print(c)
``` | output | 1 | 92,131 | 20 | 184,263 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell in the following way: the least significant bit... | instruction | 0 | 92,132 | 20 | 184,264 |
Tags: implementation
Correct Solution:
```
n = int(input())
ls = [int(u) for u in input()]
if 0 in ls:
print(ls.index(0)+1)
else:
print(len(ls))
``` | output | 1 | 92,132 | 20 | 184,265 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell in the following way: the least significant bit... | instruction | 0 | 92,133 | 20 | 184,266 |
Tags: implementation
Correct Solution:
```
import re
def main():
n = int(input())
num = input()
l = len(re.match(r'^1*', num).group(0))
print(l + 1 if l < n else n)
if __name__ == '__main__':
main()
``` | output | 1 | 92,133 | 20 | 184,267 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell in the following way: the least significant bit... | instruction | 0 | 92,134 | 20 | 184,268 |
Tags: implementation
Correct Solution:
```
n = int(input())
a = list(input())
sum = 0
for i in range(n):
if a[i] == '1':
sum += 1
else:
sum += 1
break
print(sum)
``` | output | 1 | 92,134 | 20 | 184,269 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell in the following way: the least significant bit... | instruction | 0 | 92,135 | 20 | 184,270 |
Tags: implementation
Correct Solution:
```
N = int(input())
S = input().split("0")
print(min(N,1+len(S[0])))
``` | output | 1 | 92,135 | 20 | 184,271 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell in the following way: the least significant bit... | instruction | 0 | 92,136 | 20 | 184,272 |
Tags: implementation
Correct Solution:
```
n=input()
s=input()
count=0
for i in s:
count+=1
if i=='0':
break
print(count)
``` | output | 1 | 92,136 | 20 | 184,273 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell in the following way: the least significant bit... | instruction | 0 | 92,137 | 20 | 184,274 |
Tags: implementation
Correct Solution:
```
def input_ints():
return list(map(int, input().split()))
def solve():
n = int(input())
s = input()
x = int(s[::-1], 2)
y = (x + 1) % (1 << n)
print(bin(x ^ y).count('1'))
if __name__ == '__main__':
solve()
``` | output | 1 | 92,137 | 20 | 184,275 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell in the following way: the least significant bit... | instruction | 0 | 92,138 | 20 | 184,276 |
Tags: implementation
Correct Solution:
```
n=int(input())
s=input()
print(min(len((s.split('0')[0]))+1,n))
``` | output | 1 | 92,138 | 20 | 184,277 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell ... | instruction | 0 | 92,139 | 20 | 184,278 |
Yes | output | 1 | 92,139 | 20 | 184,279 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell ... | instruction | 0 | 92,140 | 20 | 184,280 |
Yes | output | 1 | 92,140 | 20 | 184,281 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell ... | instruction | 0 | 92,141 | 20 | 184,282 |
Yes | output | 1 | 92,141 | 20 | 184,283 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell ... | instruction | 0 | 92,142 | 20 | 184,284 |
Yes | output | 1 | 92,142 | 20 | 184,285 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell ... | instruction | 0 | 92,143 | 20 | 184,286 |
No | output | 1 | 92,143 | 20 | 184,287 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell ... | instruction | 0 | 92,144 | 20 | 184,288 |
No | output | 1 | 92,144 | 20 | 184,289 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell ... | instruction | 0 | 92,145 | 20 | 184,290 |
No | output | 1 | 92,145 | 20 | 184,291 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Sergey is testing a next-generation processor. Instead of bytes the processor works with memory cells consisting of n bits. These bits are numbered from 1 to n. An integer is stored in the cell ... | instruction | 0 | 92,146 | 20 | 184,292 |
No | output | 1 | 92,146 | 20 | 184,293 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers.
Lucky number is a number that consists of digits 7 and 8 only. Find the maximum number of offices in the new building of the Tax Office giv... | instruction | 0 | 92,171 | 20 | 184,342 |
Tags: combinatorics, math
Correct Solution:
```
a=int(input());print(sum([2*2**i for i in range(a)]))
``` | output | 1 | 92,171 | 20 | 184,343 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers.
Lucky number is a number that consists of digits 7 and 8 only. Find the maximum number of offices in the new building of the Tax Office giv... | instruction | 0 | 92,172 | 20 | 184,344 |
Tags: combinatorics, math
Correct Solution:
```
n = int ( input() )
ans = 0
i = 1
while i <= n :
ans += 2**i
i += 1
print ( ans )
``` | output | 1 | 92,172 | 20 | 184,345 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers.
Lucky number is a number that consists of digits 7 and 8 only. Find the maximum number of offices in the new building of the Tax Office giv... | instruction | 0 | 92,173 | 20 | 184,346 |
Tags: combinatorics, math
Correct Solution:
```
n = input()
c = 0
for i in range(1, int(n)+1):
c += 2**i
print (c)
``` | output | 1 | 92,173 | 20 | 184,347 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers.
Lucky number is a number that consists of digits 7 and 8 only. Find the maximum number of offices in the new building of the Tax Office giv... | instruction | 0 | 92,174 | 20 | 184,348 |
Tags: combinatorics, math
Correct Solution:
```
from math import factorial
n = int(input())
a = 0
for i in range(1, n+1):
for j in range(0, i+1):
a += int(factorial(i) / (factorial(j) * factorial(i-j)))
print(a)
``` | output | 1 | 92,174 | 20 | 184,349 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.