Problem:


Score : 300 points

Problem Statement

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.

Constraints

1 ≦ x ≦ 10^{15}

x is an integer.

Input

The input is given from Standard Input in the following format:

x

Output

Print the answer.

Sample Input 1

7

Sample Output 1

2

Sample Input 2

149696127901

Sample Output 2

27217477801



Sample input:
7


Sample output:
2

Submission status: Accepted

Solution code:
x = int(input())
m = 11
if x < 7:
  ans = 1
elif x <= 11:
  ans = 2
elif x%m == 0:
  ans = x*2//m
elif 0 < x%m <= 6:
  ans = (x//m)*2+1
elif 7 <= x%m:
  ans = (x//m)*2+2
print(ans)

Submission status: Accepted

Solution code:
x = int(input())
 
print(((x-1)//11)*2 + ((x-1)%11)//6 + 1)

Submission status: Accepted

Solution code:
x = int(input())

print(((x-1)//11)*2 + ((x-1)%11)//6 + 1)

Submission status: Accepted

Solution code:
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
X = int(input())

r = [0,1,1,1,1,1,1,2,2,2,2]
print(X//11*2 + r[X%11])

Submission status: Accepted

Solution code:
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt, ceil
from functools import lru_cache, reduce
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)
 
# UnionFind
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n
 
    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
 
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
 
        if x == y:
            return
 
        if self.parents[x] > self.parents[y]:
            x, y = y, x
 
        self.parents[x] += self.parents[y]
        self.parents[y] = x
 
    def size(self, x):
        return -self.parents[self.find(x)]
 
    def same(self, x, y):
        return self.find(x) == self.find(y)
 
    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]
 
    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]
 
    def group_count(self):
        return len(self.roots())
 
    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}
 
    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())
 
def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True
 
 
# ワーシャルフロイド (任意の2頂点の対に対して最短経路を求める)
# 計算量n^3 (nは頂点の数)
def warshall_floyd(d, n):
    #d[i][j]: iからjへの最短距離
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d
 
 
# ダイクストラ
def dijkstra_heap(s, edge, n):
    #始点sから各頂点への最短距離
    d = [10**20] * n
    used = [True] * n #True:未確定
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        #まだ使われてない頂点の中から最小の距離のものを探す
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d
 
# 素因数分解
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
 
    if temp!=1:
        arr.append([temp, 1])
 
    if arr==[]:
        arr.append([n, 1])
 
    return arr
 
# 2数の最小公倍数
def lcm(x, y):
    return (x * y) // gcd(x, y)
 
# リストの要素の最小公倍数
def lcm_list(numbers):
    return reduce(lcm, numbers, 1)
 
# リストの要素の最大公約数
def gcd_list(numbers):
    return reduce(gcd, numbers)
 
# 素数判定
 
 
 
# limit以下の素数を列挙
def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []
 
    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P
 
# 同じものを含む順列
def permutation_with_duplicates(L):
 
    if L == []:
        return [[]]
 
    else:
        ret = []
 
        # set（集合）型で重複を削除、ソート
        S = sorted(set(L))
 
        for i in S:
 
            data = L[:]
            data.remove(i)
 
            for j in permutation_with_duplicates(data):
                ret.append([i] + j)
 
        return ret
 
n = int(input())
a=n//(11)
n=n-a*11
r=n%11
ans=a*2
if r==0:
    print(ans)
else:
    if r>6:
        print(ans+2)
    else:
        print(ans+1)

Submission status: Accepted

Solution code:
n = int(input())
q, r = divmod(n, 11)
if r == 0:
  print(q*2)
elif r <= 6:
  print(q*2 + 1)
else:
  print(q*2 + 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import *

def cin(): # To take limited number of inputs
    return map(int,input().split())

def cins(): # To take space sepreated strings
    return input.split()

def cino(test=False): # To take individual int input (test = False)
    if not test:
        return int(input())
    else: # To take string input (test = True)
        return input()

def cina(): # array input
  return list(map(int,input().split()))

def ssplit(): # multiple string input
    return list(input().split())

def printlist(l): # To print space seperated array
    for i in l:
        print(i,end=" ")

def main():
   n = int(input())
   print((2*(n//11)) + (n%11>0 and n%11<=6) + 2*(n%11>6))



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
X = I()

T = X//11
R = X%11

if 1<=R<=6:
  PE(T*2+1)
if R==0:
  PE(T*2)
else:
  PE(T*2+2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil
x = int(input())

m = x//11
r = x%11

if 0 < r <= 6:
    print(2*m+1)
elif r == 0:
    print(2*m)
else:
    print(2*m+2)

Submission status: Accepted

Solution code:
x = int(input())
ans = (x//11) * 2

y = x % 11

if 6 < y:
    ans += 2
elif 1 <= y <= 6:
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    x = ii()
    if x <= 6:
        print(1)
    elif x <= 11:
        print(2)
    else:
        cnt = x // 11
        res = x % 11
        if res == 0:
            tmp = 0
        elif res <= 6:
            tmp = 1
        else:
            tmp = 2
        print(cnt * 2 + tmp)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
p=n//11
if 11*p==n:print(p*2)
elif 11*p+6>=n:print(p*2+1)
else:print(p*2+2)

Submission status: Accepted

Solution code:
x = int(input())
def Main(x):
    d, m = divmod(x, 11)
    if m == 0:
        return d*2
    else:
        return d*2+(m-1)//6+1
    
print(Main(x))

Submission status: Accepted

Solution code:
x = int(input())
ans = 0

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

Submission status: Accepted

Solution code:
x = int(input())

divided_11 = x // 11
check_num = divided_11 * 11
ans = divided_11 * 2

if x % 11 == 0:
    print(ans)
else:
    while True:
        check_num += 6
        ans += 1
        if check_num >= x:
            print(ans)
            break
        check_num += 5
        ans += 1
        if check_num >= x:
            print(ans)
            break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
x = int(input())
print((x // 11) * 2 + (2 if x % 11 > 6 else 1 if x % 11 != 0 else 0))

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
ans += 2*(n // 11)
n %= 11
if n >= 7:
    print(ans+2)
elif n >= 1:
    print(ans+1)
else:
    print(ans)

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Thu May 14 17:27:39 2020

@author: shinba
"""

x = int(input())

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

Submission status: Accepted

Solution code:
def main():
    x = int(input())
    p, q = divmod(x, 11)
    r, s = divmod(q, 6)
    ans = 2 * p + r + int(s != 0)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    x = int(input())
    if x <= 6:
        ans = 1
    else:
        p, q = divmod(x, 11)
        r, s = divmod(q, 6)
        ans = 2 * p + r + int(s != 0)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x = int(input())

div = x // 11
mod = x % 11

if (mod == 0):
    ans = div * 2

elif (0 < mod <= 6):
    ans = div * 2 + 1
else:
    ans = div * 2 + 2

print(ans)

Submission status: Accepted

Solution code:
# 1 -> 5 -> 6 -> 5 -> 6 ...
# 2 -> 6 -> 5 -> 6 -> 5 ...
# 3 -> 6 -> 5 -> 6 -> 5 ...
# 4 -> 6 -> 5 -> 6 -> 5 ...
# 5 -> 6 -> 5 -> 6 -> 5 ...
# 6 -> 5 -> 6 -> 5 -> 6 ...

x = int(input())

div, mod = divmod(x, 11)

n = div * 2

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

Submission status: Accepted

Solution code:
x = int(input())

a = x // 11
b = x % 11

if(b > 6 and b != 0):
    print(a*2 + 2)
elif(b <= 6 and b != 0):
    print(a*2 + 1)
elif(b == 0):
    print(a*2)

Submission status: Accepted

Solution code:
x = int(input())
a = x//11
b = x%11
if b > 6:
  c = 2
elif b > 0:
  c = 1
else:
  c = 0
print(2*a+c)

Submission status: Accepted

Solution code:
x = int(input())
cnt = 0

a = int(x/11)
cnt = a*2
x -= 11*a
if x == 0:
    cnt += 0
elif x < 7:
    cnt += 1
else:
    cnt += 2
print(cnt)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

x = INT()

ans = x//11 * 2
x %= 11

if 0 < x <= 6:
	ans += 1
elif 7 <= x:
	ans += 2
print(ans)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

x = INT()

ans = x//11 * 2
x %= 11

if x == 0:
	print(ans)
else:
	ans += x//6
	x %= 6
	if x == 0:
		print(ans)
	else:
		print(ans+1)

Submission status: Accepted

Solution code:
def resolve():
	x = int(input())
	r = 0
	if x % 11 > 6:
		r = 2
	elif x % 11:
		r = 1

	print((x // 11 * 2) + r)
resolve()

Submission status: Accepted

Solution code:
x = int(input())
cnt = 0

a = int(x/11)
cnt = a*2
x -= 11*a
if x == 0:
    cnt += 0
elif x < 7:
    cnt += 1
else:
    cnt += 2
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
if a<=6:
    print("1")
    exit()
if a<=11:
    print("2")
    exit()
if a%11==0:
    print(int(a/11)*2)
    exit()
if a%11<=6:
    print(int(a/11)*2+1)
else:
    print(int(a / 11) * 2 + 2)

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9 + 7
x = int(input())
cnt = 0
if x<=6:
    print(1)
elif x<=11:
    print(2)
else:
    if x%11 == 0:
        print((x//11)*2)
    elif x%11 > 6:
        print(((x//11)+1)*2)
    else:
        print((x//11)*2 + 1)

Submission status: Accepted

Solution code:
x = int(input())

n = x//11 
m = x % 11

if m >6:
    mm = 2

elif m == 0:
    mm = 0
else:
    mm =1

print(n*2+mm)

Submission status: Accepted

Solution code:
z=int(input())
#1と6の時は5
#他はすべて6出せる。
#つまり基本的には6,5,6,5,6,,,,と続けられます。
#11で割ってあげた余りが6より大きいか小さいかで5を追加するか考える。

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def c_yet_another_die_game():
    X = int(input())
    q, r = divmod(X, 11)
    return 2 * q + ((r - 1) // 6 + 1)

print(c_yet_another_die_game())

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
x=int(input())
if x%11==0:
  print((x//11)*2)
else:
  if x%11<7:
    print((x//11)*2+1)
  else:
    print((x//11)*2+2)

Submission status: Accepted

Solution code:
I = lambda: map(int, input().rstrip().split())
n = int(input())
if n <= 6:
  print(1)
else:
  ans = (n // 11) * 2
  if n % 11 == 0:
     pass
  elif (n // 11) % 2 == 0:
    if n % 11 <= 6:
      ans += 1
    else:
      ans += 2
  else:
    if n % 11 <= 5:
      ans += 1
    else:
      ans += 2
  print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

count = 0

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

if(1 <= x <= 6):
    count += 1
if(x >= 7):
    count += 2

print(count)

Submission status: Accepted

Solution code:
x = int(input())
y = x % 11
z = x // 11
if 0 <  y  <= 6:
    print(2*z + 1)
elif y == 0:
    print(2*z)
elif 7 <= y <= 11:
    print(2*z +2 )

Submission status: Accepted

Solution code:
def resolve():
    X = int(input())
    res = (X // 11) * 2
    rem = X % 11
    if rem != 0:
        if rem <= 6:
            res += 1
        else:
            res += 2
    print(res)

if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
import math 
x = int(input())
Su = math.floor(x/11)
M = x%11
if M ==0:
    print(Su*2)
else:
    if M <= 6:
        print(Su*2+1)
    else:
        print(Su*2+2)

Submission status: Accepted

Solution code:
import math 
x = int(input())
Su = math.floor(x/11)
M = x%11
if x < 11:
    if x <=6:
        print(1)
    else:
        print(2)
else:
    if M ==0:
        print(Su*2)
    else:
        if M <= 6:
            print(Su*2+1)
        else:
            print(Su*2+2)

Submission status: Accepted

Solution code:
x = int(input())
double, rest = divmod(x, 11)
if rest == 0:
    add = 0
elif 1<= rest <= 6:
    add = 1
else:
    add = 2
ans = double * 2 + add
print(ans)

Submission status: Accepted

Solution code:
x = int(input())
c = 2 * (x // 11)
if x % 11 == 0:
    pass
elif x - 11 * (x // 11) > 6:
    c += 2
else:
    c += 1
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
x = int(input())
ans = x // 11 * 2

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    x=int(input())
    ans=x//11
    x-=ans*11
    ans*=2
    ans+=-(-x//6)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
n-=1
ans=(n//11)*2
if n%11<=5:
    ans+=1
else:
    ans+=2
print(ans)

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline

def main():
    x = int(readline())
    ans = x // 11 * 2
    v = ans // 2 * 11
    if v < x:
        v += 6
        ans += 1
    if v < x:
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
ans = N//11
ans1 = N % 11
if(ans1 >= 7):
  ans2 = ans * 2 + 2
elif(ans1 <= 6) and (ans1 >= 1):
  ans2 = ans * 2 + 1
else:
  ans2 = ans * 2
print(ans2)

Submission status: Accepted

Solution code:
#6→5を交互に上に向けるのが効率良い

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

Submission status: Accepted

Solution code:
a=int(input())
ans=a//11*2
a%=11
if 6>=a>=1:ans+=1
elif a!=0:ans+=2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
k = x // 11
l = x % 11
ans = 2 * k
if l >= 7:
    ans += 2
elif l >= 1:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
if n%11 == 0:
    print((n//11)*2)
elif n%11 < 7:
    print((n//11)*2+1)
else:
    print((n//11)*2+2)

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

Solution code:
def main():
  x = int(input())
  x, y = divmod(x, 11)
  ret = 2 * x + (y+5) // 6
  print(ret)

if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

q = x // 11; r = x % 11

if r == 0:
    print(2 * q)
elif r <= 6:
    print(2 * q + 1)
else:
    print(2 * q + 2)

Submission status: Accepted

Solution code:
x = int(input())

d, m = divmod(x, 11)
d *= 2

if m >= 7:
    d += 2
elif m >= 1:
    d += 1
print(d)

Submission status: Accepted

Solution code:
x = int(input())

ans = x//11*2
if 1<= x%11 <= 6:
    ans += 1
elif x%11 >= 7:
    ans += 2

print(ans)

Submission status: Accepted

Solution code:
X = int(input())

a, b = divmod(X, 11)

if b == 0:
    print(a * 2)
elif b <= 6:
    print(a * 2 + 1)
else:
    print(a * 2 + 2)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    X = int(input())

    result = (X // 11) * 2
    X %= 11

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# solution
import io

data = int(input())
mike = 1 if data % 11 else 0
print((data // 11) * 2 + (data % 11) // 7 + mike)

Submission status: Accepted

Solution code:
x = int(input())
a = x//11
r = x-a*11
ans = 2*a
if r>0:
    if r<=6:ans+=1
    else:ans+=2
print(ans)

Submission status: Accepted

Solution code:
x = int(input())
#6,5,6,5...で何回加算されていくか。
#余りの部分は後で処理
ans = x // 11 * 2

if x % 11 > 6:
    print(ans + 2)
elif x % 11 > 0:
    print(ans + 1)
else:
    print(ans)#余りなし=割り切れる時

Submission status: Accepted

Solution code:
N = int(input())
a = N // 11
b = N % 11
if 0 < b <= 6:
    c = 1
elif b == 0:
    c = 0
else:
    c = 2
print(a*2+c)

Submission status: Accepted

Solution code:
x = int(input())

ans = (x//11) *2

if x%11 >= 7:
    ans += 2
elif x%11 >= 1:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(s):

    tmp = s // 11 * 2
    if s % 11 > 6:
        tmp += 2
    elif 6 >= s % 11 > 0:
        tmp+=1
    return tmp

if __name__ == "__main__":
    x = int(input())
    print(solve(x))