TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
# coding: utf-8
from math import ceil, floor
X = int(input())
if X >= 6:
    print(1)
else:
    print(ceil(X / 11 * 2))

# coding: utf-8
from math import ceil
X = int(input())
if X <= 6:
    print(1)
else:
    mod = X % 11
    if mod >= 7:
        print(X // 11 * 2 + 2)
    elif mod == 0:
        print(X // 11 * 2)
    else:
        print(X // 11 * 2 + 1)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
def main():
    x = int(input())
    s = 0
    f = 0
    while ans < x:
        s += 1
        tmp = 6*s + 5*f
        if tmp >= x:
            print(s+f)
            exit()
        f += 1
        tmp += 5
        if tmp >= x:
            print(s+f)
            exit()

if __name__ == "__main__":
    main()

def main():
    x = int(input())
    ans = x//11
    chk = x%11
    if chk == 0:
        print(2*ans)
    elif chk <=6:
        print(2*ans+1)
    else:
        print(2*ans+2)

if __name__ == "__main__":
    main()

Verdicts: Runtime Error

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):


x = int(input())
count = 0
if x == 1:
    print(count)
    exit()
else:
    x -= 1
    count += 1

count += (x // 11) * 2
x = x % 11

# if x == 1 or x == 8 or x == 9:
#     count += 2
# elif x == 7 or x == 10:
#     count += 3
# elif x == 0:
#     print(count)
#     exit()
# else:
#     count += 1

print(count)




x = int(input())
count = 0
if x == 1:
    print(count)
    exit()
else:
    x -= 1
    count += 1

count += (x // 11) * 2
x = x % 11
print(x)
if x == 1 or x == 8 or x == 9:
    count += 2
elif x == 7 or x == 10:
    count += 3
elif x == 0:
    print(count)
    exit()
else:
    count += 1

print(count)




x = int(input())
count = 0
if x == 1:
    print(count)
    exit()
else:
    x -= 1
    count += 1

count += (x // 11) * 2
x = x % 11

if x == 0:
    print(count)
elif x >= 6:
    print(count + 2)
else:
    print(count + 1)



x = int(input())
count = (x // 11) * 2
x = x % 11
if x > 6:
    print(count+2)
elif x > 0:
    print(count+1)
else:
    print(count)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x=int(input())

ans=((x-1)//11)*2
if (x-1)%11>6:
  print(ans+2)
else:
  print(ans+1)

x=int(input())

ans=(x//11)*2
if x%11>6:
  print(ans+2)
elif x%11==0:
  print(ans)
else:
  print(ans+1)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x=int(input())
t=x//11
if x-t==0:
  print(t*2)
elif x-t<=6:
  print(t*2+1)
else:
  print(t*2+1)

x=int(input())
t=x//11
if x-t*11==0:
  print(t*2)
elif x-t*11<=6:
  print(t*2+1)
else:
  print(t*2+2)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
N = int(input())
if N % 11 > 6:
  print(N+10//11*2)
elif n % 11 == 0:
  print(N//11*2)
else:
  print(N//11*2+1)

N = int(input())
if N % 11 > 6:
  print((N+10)//11*2)
elif N % 11 == 0:
  print(N//11*2)
else:
  print(N//11*2+1)

Verdicts: Runtime Error

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
target_score = int(input())

cnt = target_score // 11 * 2
target_score = target_score % 11

if cnt == 0:
    print(cnt)
elif 1 <= cnt <= 6:
    print(cnt + 1)
else:
    print(cnt + 2)


target_score = int(input())

cnt = target_score // 11 * 2
target_score = target_score % 11


if target_score == 0:
    print(cnt)
elif target_score <= 6:
    print(cnt + 1)
else:
    print(cnt + 2)


Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
n = int(input())
lis = list(map(int,input().split()))
ans = set()
for num in lis:ans.add(num)
print(len(ans)-((len(ans) % 2)+1)%2)

import math
n = int(input())
print(2 * (n // 11) + math.ceil((n % 11) / 6))

Verdicts: Runtime Error

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
# -*- coding: utf-8 -*-
from math import ceil

def solve():
    x = int(input())
    res = 2*(x//11) + (x%11!=0)
    return str(res)

if __name__ == '__main__':
    print(solve())


# -*- coding: utf-8 -*-
from math import ceil

def solve():
    x = int(input())
    res = 2*ceil(x/11) - (0 < x%11 <= 6)
    return str(res)

if __name__ == '__main__':
    print(solve())


Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x = int(input())
 
if x % 11 == 0:
    ans = x // 11 * 2
else:
    if x / 11 < 1:
        if x // 6 > 1:
            ans = 2
        else:
            ans = 1
    else:
        ans = x // 11 * 2 + 1
 
print(ans)

if x / 11 < 1:
    ans = 1
    if x / 5 >= 1:
        ans = 2
else:
    ans = x // 11 * 2 + 1

print(ans)

x = int(input())
ans = x//11*2
p = x % 11
if p > 0:
    p -= 6
    ans += 1
if p > 0:
    p -= 5
    ans += 1
 
print(ans)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x = int(input())
quot = x//11
if x >= 11:
    quot *= 2
if x%11 > 0:
    quot += 1
print(quot)


x = int(input())
quot = x//11
if x >= 11:
    quot *= 2
remainder = x%11
if remainder > 6:
    quot += 2
else:
    if remainder != 0:
        quot += 1
print(quot)


Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x = int(input())

if x%11 <= 6:
    print((x//11)*2 + 1)
else:
    print((x//11)*2 * 2)


x = int(input())
if x%11 == 0:
    print((x//11)*2)
elif x%11 <= 6:
    print((x//11)*2 + 1)
else:
    print((x//11)*2 + 2)


Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x = int(input())

num = x // 11

x %= 11
if x == 0:
    print(num * 2)
else:
    print(num * 2 + 1)

x = int(input())

num = x // 11

x %= 11
if x == 0:
    print(num * 2)
elif x <= 6:
    print(num * 2 + 1)
else:
    print(num * 2 + 2)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
import math 
x = int(input())
xi = math.floor(x/5.5)
print(xi)
for i in range(xi,100000000000000):
    # print(6*i - math.floor(i/2))
    if(x < 6*i-math.floor(i/2)):
        xa = i
        break

print(xa)


import math 
x = int(input())
xi = math.floor(x/5.5)
print(xi)
for i in range(xi,100000000000000):
    print(6*i - math.floor(i/2))
    if(x < 6*i-math.floor(i/2)):
        xa = i
        break

print(xa)


import math 
x = int(input())
# x = 10**15
xi = math.floor(x/5.5)
# print(xi)
for i in range(xi,10000000000000000000000000000):
    # print(6*i - math.floor(i/2))
    if(x <= 6*i-math.floor(i/2)):
        xa = i
        break

print(xa)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x = input()
print((x // 11) * 2 + (2 if x % 11 > 6 else 1))


x = int(input())
ans = (x // 11) * 2
if x % 11:
    if x % 11 > 6:
        ans += 2
    else:
        ans += 1
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x = int(input())

tmp = (x // 7)
rem = x - tmp * 7
if rem == 0:
    print(tmp)
else:
    print(tmp + 1)


#!/usr/bin/env python
# -*- coding:utf-8 -*-

import math


x = int(input())
tmp = int(math.ceil(x / 11.0 * 2.0))
# print(11 * tmp // 2)
# print(tmp)
if (11 * tmp) // 2 - 5 >= x:
    print(tmp-1)
else:
    print(tmp)


Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x=int(input())
ans=0
ans+=x//11*2
x%=11
if x>4:
  x-=5
  ans+=1
print(ans)

x=int(input())
ans=x//11*2
x%=11
if x<7:
  x-=6
  ans+=1
print(ans)

x=int(input())
ans=0
ans+=x//11*2
x%=11
if x>5:
  x-=6
  ans+=1
print(ans)

x=int(input())
ans=x//11*2
x%=11
if x>0 and x<7:
  ans+=1
if x>6:
  ans+=2
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
import math
x=int(input())
if x<=6:
    print(0)
    exit()

ans=math.ceil(x/11)*2
if ans//2*11-x>=6:
    ans+=-1

print(ans if x>11 else 1)

import math
x=int(input())
if x<=6:
    print(1)
    exit()

ans=math.ceil(x/11)*2
if ans//2*11-x>=5:
    ans+=-1

print(ans if x>11 else 2)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
# 2019/08/11

x=int(input())
ans=2*x//11
if x%11>6:
    ans+=2
else:
    ans+=1
print(ans)



x = int(input())
d,m = divmod(x,11)
ans = d*2
ans += 1

if m > 6:
    ans += 1
elif m == 0:
    ans -= 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x = int(input())
x -=1

tmp = x//11
tmp *= 2
a = x%11

if a == 0:
    tmp = tmp
elif a <= 6:
    tmp += 1
else:
    tmp += 2

print(tmp)

x = int(input())

tmp = x//11
tmp *= 2
a = x%11

if a == 0:
    tmp = tmp
elif a <= 6:
    tmp += 1
else:
    tmp += 2

print(tmp)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))
D = {}
for i in A:
    if i in D:
        D[i] += 1
    else:
        D[i] = 1
cnt = 0
for k in D.keys():
    if D[k] % 2:
        D[k] = 1
    else:
        D[k] = 2
        cnt += 1
print(len({*A}) - (cnt % 2))

N = int(input())
d, m = divmod(N, 11)
a = (1 if m else 0) if m < 7 else 2
print(d * 2 + a)

Verdicts: Runtime Error

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x = int(input())
ans = x // 11 * 2
nokori = x % 11
if nokori > 6:
    print(ans + 2)
if nokori == 0:
    print(ans)
else:
    print(ans + 1)

x = int(input())
ans = x // 11 * 2
nokori = x % 11
if nokori > 6:
    print(ans + 2)
elif nokori == 0:
    print(ans)
else:
    print(ans + 1)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):
x = int(input())
t = x // 11
x -= 11 * t
ans = t * 2
if x <= 5:
    ans += 1
elif 5 < x < 11:
    ans += 2
print(ans)za

x = int(input())

ans = 2*(x // 11)
x %= 11
if x == 0:
    pass
elif 0 < x <= 6:
    ans += 1
elif 6 < x <= 11:
    ans += 2
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Snuke has decided to play with a six-sided die. Each of its six sides shows an integer 1 through 6, and two numbers on opposite sides always add up to 7.  Snuke will first put the die on the table with an arbitrary side facing upward, then repeatedly perform the following operation:    * Operation: Rotate the die 90° toward one of the following directions: left, right, front (the die will come closer) and back (the die will go farther). Then, obtain y points where y is the number written in the side facing upward.  For example, let us consider the situation where the side showing 1 faces upward, the near side shows 5 and the right side shows 4, as illustrated in the figure. If the die is rotated toward the right as shown in the figure, the side showing 3 will face upward. Besides, the side showing 4 will face upward if the die is rotated toward the left, the side showing 2 will face upward if the die is rotated toward the front, and the side showing 5 will face upward if the die is rotated toward the back.    Find the minimum number of operation Snuke needs to perform in order to score at least x points in total.

Submission attempts (in order):

def solve(x):
    q = (x - 1) // 11
    r = (x - 1) % 11
    if r <= 6:
        return 2 * q + 1
    return 2 * q + 2

x = int(input())
print(solve(x))



def solve(x):
    q = (x - 1) // 11
    r = (x - 1) % 11
    if r <= 7:
        return 2 * q + 1
    return 2 * q + 2

x = int(input())
print(solve(x))



def solve(x):
    q = (x - 1) // 11
    r = (x - 1) % 11
    if r <= 5:
        return 2 * q + 1
    return 2 * q + 2

x = int(input())
print(solve(x))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Snuke has decided to play a game using cards. He has a deck consisting of N cards. On the i-th card from the top, an integer A_i is written.  He will perform the operation described below zero or more times, so that the values written on the remaining cards will be pairwise distinct. Find the maximum possible number of remaining cards. Here, N is odd, which guarantees that at least one card can be kept.  Operation: Take out three arbitrary cards from the deck. Among those three cards, eat two: one with the largest value, and another with the smallest value. Then, return the remaining one card to the deck.

Submission attempts (in order):
# ARC068D - Card Eater (ABC053D)
from collections import Counter


def main():
    N = int(input())
    A = tuple(map(int, input().split()))
    C = sorted(Counter(A).values(), reverse=1)
    ans, stock = 0, 0
    for i in C:
        if i == 1:
            ans += 1
        else:
            if i >= 3:
                ans += 1
                stock += i - 1
            else:
                if stock:
                    ans += 1
                    stock -= 1
        print(i,ans,stock)
    print(ans)


if __name__ == "__main__":
    main()

# ARC068D - Card Eater (ABC053D)
def main():
    N = int(input())
    A = tuple(map(int, input().split()))
    ans = len(set(A))
    ans -= (N - ans) % 2
    print(ans)


if __name__ == "__main__":
    main()

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play a game using cards. He has a deck consisting of N cards. On the i-th card from the top, an integer A_i is written.  He will perform the operation described below zero or more times, so that the values written on the remaining cards will be pairwise distinct. Find the maximum possible number of remaining cards. Here, N is odd, which guarantees that at least one card can be kept.  Operation: Take out three arbitrary cards from the deck. Among those three cards, eat two: one with the largest value, and another with the smallest value. Then, return the remaining one card to the deck.

Submission attempts (in order):
from collections import Counter
n = int(input())
a = [int(i) for i in input().split()]
k = Counter(a)
b = list(k.values())
over_2 = [bb for bb in b if bb >= 2]
if sum(over_2) % 2 == 1:
    print(len(b))
else:
    if len(over_2 == 0):
        print(len(b))
    else:
        print(len(b) - 1)

from collections import Counter
n = int(input())
a = [int(i) for i in input().split()]
k = Counter(a)
b = list(k.values())
b = [1 if bb % 2 == 1 else 2 for bb in b]
over_2 = [bb for bb in b if bb >= 2]
if len(over_2) == 0:
    print(len(b))
elif len(over_2) % 2 == 0:
    print(len(b))
else:
    print(len(b) - 1)



Verdicts: Runtime Error

Accepted
Problem: Snuke has decided to play a game using cards. He has a deck consisting of N cards. On the i-th card from the top, an integer A_i is written.  He will perform the operation described below zero or more times, so that the values written on the remaining cards will be pairwise distinct. Find the maximum possible number of remaining cards. Here, N is odd, which guarantees that at least one card can be kept.  Operation: Take out three arbitrary cards from the deck. Among those three cards, eat two: one with the largest value, and another with the smallest value. Then, return the remaining one card to the deck.

Submission attempts (in order):
def calc(n):
  ret=n
  while ret>=3:
    ret=ret%3+ret//3
  return ret

n=int(input())
arr=list(map(int,input().split()))
cnt=[0]*(10**5+1)
for i in range(n):
  cnt[arr[i]]+=1
cnt1=0
cnt2=0
for i in range(n):
  tmp=calc(cnt[i])
  if tmp==1:
    cnt1+=1
  elif tmp==2:
    cnt2+=1
if cnt2%2==0:
  print(cnt1+cnt2)
else:
  print(cnt1+cnt2-1)

def calc(n):
  ret=n
  while ret>=3:
    ret=ret%3+ret//3
  return ret

n=int(input())
arr=list(map(int,input().split()))
cnt=[0]*(10**5+1)
for i in range(n):
  cnt[arr[i]]+=1
cnt1=0
cnt2=0
for i in range(10**5+1):
  tmp=calc(cnt[i])
  if tmp==1:
    cnt1+=1
  elif tmp==2:
    cnt2+=1
if cnt2%2==0:
  print(cnt1+cnt2)
else:
  print(cnt1+cnt2-1)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play a game using cards. He has a deck consisting of N cards. On the i-th card from the top, an integer A_i is written.  He will perform the operation described below zero or more times, so that the values written on the remaining cards will be pairwise distinct. Find the maximum possible number of remaining cards. Here, N is odd, which guarantees that at least one card can be kept.  Operation: Take out three arbitrary cards from the deck. Among those three cards, eat two: one with the largest value, and another with the smallest value. Then, return the remaining one card to the deck.

Submission attempts (in order):
from collections import Counter
import heapq

n = int(input())
a = Counter(map(int, input().split()))

x = []
for k in a:
    if a[k] > 1:
        x.append(-(a[k] - 1))

heapq.heapify(x)

while len(x) > 1:
    u = - heapq.heappop(x)
    v = - heapq.heappop(x)
    n -= v * 2
    d = u - v
    if d > 0:
        heapq.heappush(x, -d)

if len(x) > 0:
    n -= heapq.heappop(x) * 2
    pass

print(n)



from collections import Counter
import heapq
 
n = int(input())
a = Counter(map(int, input().split()))
 
x = []
for k in a:
    if a[k] > 1:
        x.append(-(a[k] - 1))
 
heapq.heapify(x)
 
while len(x) > 1:
    u = abs(heapq.heappop(x))
    v = abs(heapq.heappop(x))
    n -= min(v, u) * 2
    d = abs(u - v)
    if d > 0:
        heapq.heappush(x, -d)
 
if len(x) > 0:
    p = abs(heapq.heappop(x))
    n -= p + p % 2
 
print(n)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play a game using cards. He has a deck consisting of N cards. On the i-th card from the top, an integer A_i is written.  He will perform the operation described below zero or more times, so that the values written on the remaining cards will be pairwise distinct. Find the maximum possible number of remaining cards. Here, N is odd, which guarantees that at least one card can be kept.  Operation: Take out three arbitrary cards from the deck. Among those three cards, eat two: one with the largest value, and another with the smallest value. Then, return the remaining one card to the deck.

Submission attempts (in order):
n = input()
l = len(set([int(x) for x in input().split()]))
print(l - l % 2)

n=input()
l=len(set([int(x) for x in input().split()]))
print(l-(l+1)%2)

Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play a game using cards. He has a deck consisting of N cards. On the i-th card from the top, an integer A_i is written.  He will perform the operation described below zero or more times, so that the values written on the remaining cards will be pairwise distinct. Find the maximum possible number of remaining cards. Here, N is odd, which guarantees that at least one card can be kept.  Operation: Take out three arbitrary cards from the deck. Among those three cards, eat two: one with the largest value, and another with the smallest value. Then, return the remaining one card to the deck.

Submission attempts (in order):
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
print(len(c))

from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
len_c = len(c)
b = {k:v for k,v in c.items() if v > 1}
sum_b = sum(b.values())
if n == 3:
    print(1)
if (sum_b + len(b)) % 2 == 0:
    print(len_c)
else:
    print(len_c - 1)


Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play a game using cards. He has a deck consisting of N cards. On the i-th card from the top, an integer A_i is written.  He will perform the operation described below zero or more times, so that the values written on the remaining cards will be pairwise distinct. Find the maximum possible number of remaining cards. Here, N is odd, which guarantees that at least one card can be kept.  Operation: Take out three arbitrary cards from the deck. Among those three cards, eat two: one with the largest value, and another with the smallest value. Then, return the remaining one card to the deck.

Submission attempts (in order):
from collections import Counter

input()
c = Counter(map(int, input().split()))
print(len(c))


from collections import Counter

input()
c = Counter(map(int, input().split()))
print((len(c) - 1) // 2 * 2 + 1)


Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play a game using cards. He has a deck consisting of N cards. On the i-th card from the top, an integer A_i is written.  He will perform the operation described below zero or more times, so that the values written on the remaining cards will be pairwise distinct. Find the maximum possible number of remaining cards. Here, N is odd, which guarantees that at least one card can be kept.  Operation: Take out three arbitrary cards from the deck. Among those three cards, eat two: one with the largest value, and another with the smallest value. Then, return the remaining one card to the deck.

Submission attempts (in order):
input()
a = [0] * (100000 + 1)

for i in map(int, input().split()):
    a[i] += 1
    if a[i] == 3:
        a[i] >>= 1

c = [0, a.count(1), a.count(2)]

ans = 0
ans += (c[2] >> 1) << 1
ans += c[1]
ans -= c[2] & 1

print(ans)


input()
a = [0] * (100000 + 1)

for i in map(int, input().split()):
    a[i] += 1
    if a[i] == 3:
        a[i] >>= 1

c = [0, a.count(1), a.count(2)]

ans = 0
ans += (c[2] >> 1) << 1
ans += c[1]

print(ans)




Verdicts: Wrong Answer

Accepted
Problem: Snuke has decided to play a game using cards. He has a deck consisting of N cards. On the i-th card from the top, an integer A_i is written.  He will perform the operation described below zero or more times, so that the values written on the remaining cards will be pairwise distinct. Find the maximum possible number of remaining cards. Here, N is odd, which guarantees that at least one card can be kept.  Operation: Take out three arbitrary cards from the deck. Among those three cards, eat two: one with the largest value, and another with the smallest value. Then, return the remaining one card to the deck.

Submission attempts (in order):
from collections import Counter

N = int(input())
A = list(map(int,input().split()))

counter = Counter(A)

counts = counter.most_common()

dup_num = 0
for i in range(len(counts)):
    if counts[i][1] != 1:
        dup_num += counts[i][1]-1

print(counts)
if dup_num%2 == 0:
    print(N-dup_num)
else:
    print(N-dup_num-1)

from collections import Counter

N = int(input())
A = list(map(int,input().split()))

counter = Counter(A)

counts = counter.most_common()

dup_num = 0
for i in range(len(counts)):
    if counts[i][1] != 1:
        dup_num += counts[i][1]-1

if dup_num%2 == 0:
    print(N-dup_num)
else:
    print(N-dup_num-1)

Verdicts: Wrong Answer

Accepted