submission_id
string
problem_id
string
status
string
code
string
input
string
output
string
problem_description
string
s660993826
p04048
Wrong Answer
def gcd(a,b): return a and gcd(b%a,a)or b N,X=map(int,input().split()) g=gcd(N,X) z=N//g b=(N-X)//g a=min(X,N-X)//g while a>1: c=b while c: z+=2*a c//=a a,b=b%a,a print(g*(z-1))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s146736681
p04048
Wrong Answer
x,y=map(int,input().split()) z=3.5*y+x print(z)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s292849948
p04048
Wrong Answer
n, x = map(int, input().split()) sum_lec = x + (n - x) + x + x +(n - 2 * x) * 3 print(sum_lec)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s828235794
p04048
Wrong Answer
def trajectory_cal(N, X): length = 4*N - 4*X return length N, X = input().split() value = trajectory_cal(int(N), int(X)) print(value)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s899469918
p04048
Wrong Answer
N,X = [int(zz) for zz in input().split()] print(6*X)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s379512034
p04048
Wrong Answer
# import numpy as np import sys sys.setrecursionlimit(10 ** 5) N, X = map(int, input().split()) if N > 1000: exit() if 2 * X > N: X = N - X #座標の作成 dp = [[-1] * (N+3)] for i in range(N+1): tmp = [-1] for j in range(N+1): if i <= j: tmp.append(0) #到達していないマス else: ...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s949297241
p04048
Wrong Answer
n,x = map(int,input().split()) import math def f(x,y): a = min(x,y) b = max(x,y) if a == 0: return 0 elif b%a == 0: return 2*b-1 else: return 2*a*math.floor(b/a) + f(a,b%a) print(n+f(x,n-x))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s787194007
p04048
Wrong Answer
N, X = map(int, input().split()) if 2 * X > N: X = N - X # if N == 2 * X: # print (3 * X) # exit() # if X == 1: # print (3 * X * (N - 1)) # exit() # if X == 2: # print (3 * X * 2) # exit() x = 3 * X n = (N - 1)//X print (x * n)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s164264081
p04048
Wrong Answer
n, x = list(map(int, input().split())) ans = x a = x b = n - x while b > 0: ans += (a // b) * 2 * b if a % b > 0: ans += 1 a, b = b, a % b print(ans)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s073619898
p04048
Wrong Answer
a, b = map(int, input().split()) print(a * 2 + b)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s434517532
p04048
Wrong Answer
def is_prime(n: int)->bool: d = 2 while d * d <= n: if n % d == 0: return False d += 1 return True def mysterious_light(N: int, X: int)->int: if is_prime(N): return 3*(N-1) return 3*max(N-X, X) if __name__ == "__main__": N, X = map(int, input().split()) ...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s780811728
p04048
Wrong Answer
def is_prime(n: int)->bool: d = 2 while d * d <= n: if n % d == 0: return False d += 1 return True def mysterious_light(N: int, X: int)->int: if is_prime(N): return 3*(N-1) return 3*(N-X) if __name__ == "__main__": N, X = map(int, input().split()) ans...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s388156638
p04048
Wrong Answer
N,X = map(int, input().split()) def para(a,b): if a == b: return a else: if a%b == 0: return (2*(a//b) -1)*b if a%b != 0: return (2*(a//b) -1)*b + para(b,a%b) if X >= N-X: print(N+para(X,N-X)) else: print(N+para(N-X,X))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s803960281
p04048
Wrong Answer
N,X = map(int, input().split()) def para(a,b): if a == b: return a else: if a%b == 0: return (2*(a//b) -1)*b if a%b != 0: return (2*(a//b) -1)*b + para(b,a%b) if X >= N-X: print(N+para(X,N-X)) if X <= N-X: print(N+para(N-X,X))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s438275531
p04048
Wrong Answer
N,X = map(int, input().split()) def para(a,b): if a == b: return a else: if a%b == 0: return (2*a//b -1)*b if a%b != 0: return (2*a//b -1)*b + para(b,a%b) if X >= N-X: print(N+para(X,N-X)) else: print(N+para(N-X,X))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s856713547
p04048
Wrong Answer
N,X = map(int, input().split()) def para(a,b): if a == b: return a else: if a%b == 0: return (2*a//b -1)*b if a%b != 0: return (2*a//b -1)*b + para(b,a%b) if X >= N-X: print(N+para(X,N-X)) if X <= N-X: print(N+para(N-X,X))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s733403426
p04048
Wrong Answer
N,X = map(int,input().split()) x = X y = N-X if x<y: x,y = y,x res = N while y>0: x,y = y,x print(x,y) m = x*(y//x) res += m*2 y -= m res -= x print(res)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s891475221
p04048
Wrong Answer
def calc(a,b,ans): if b==0: return ans else: if b!=1: return calc(b,a%b,ans+b*3) else: return calc(b,a%b,ans+a*3) n,x=map(int,input().split()) n=n-x n,x=max(n,x),min(n,x) print(calc(n,x,0))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s044963083
p04048
Wrong Answer
def calc(a,b,ans): if b==0: return ans else: if b!=1: return calc(b,a%b,ans+b*3) else: return calc(b,a%b,ans+a*3) n,x=map(int,input().split()) n,x=max(n,x),min(n,x) print(calc(n,x,0))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s100546763
p04048
Wrong Answer
N, X = map(int, input().split()) print((N-1)*3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s500582302
p04048
Wrong Answer
n,x=map(int,input().split()) ans=0 if x<n/2: a=x b=n-x ans+=n-x while True: if b%a==0: ans+=a*2*(b//a) break else: ans+=a*2*(b//a) a,b=b%a,a elif x==n/2: ans=3*x elif x>n/2: a=n-x b=x ans+=x while True: if b%a==0...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s375652488
p04048
Wrong Answer
n,x=map(int,input().split()) ans=0 if x<n/2: a=x b=n-x ans+=x+n while True: if b%a==0: ans+=a*2*(b//a-1) break else: ans+=a*2*(b//a) a,b=b%a,a elif x==n/2: ans=3*x elif x>n/2: a=n-x b=x ans+=x while True: if b%a=...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s901611092
p04048
Wrong Answer
n,x=map(int,input().split()) ans=0 if x<n/2: a=x b=n-x ans+=x+n while True: if b%a==0: ans+=a*2*(b/a) break else: ans+=a*2*(b//a) a,b=b%a,a elif x==n/2: ans=3*x elif x>n/2: a=n-x b=x ans+=x while True: if b%a==0:...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s078904079
p04048
Wrong Answer
n,m=map(int,input().split()) print(n//2*3 if n/2==m else n*3-3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s276456976
p04048
Wrong Answer
n,m=map(int,input().split()) print(n//2*3 if n//2==m else n*3-3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s621534239
p04048
Wrong Answer
n,m=map(int,input().split()) print(n*3-3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s769947366
p04048
Wrong Answer
n, x = [int(i) for i in input().split()] cnt=0 short = min(x,n-x) long = max(x, n-x) cnt += n #cnt += x*(2*(n//x)-1) + (n-x) while(1): c = long % short a = long //short if c==0: break else: cnt += short * 2 * a long = short short = c cnt += short * 2 * a -1 print(cnt...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s405000975
p04048
Wrong Answer
N, X = map(int, input().split()) print(X * 6)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s408087727
p04048
Wrong Answer
N, X = list(map(int, input().split())) ans = N a, b = sorted([X, N - X]) while True: if b % a == 0: ans += (int(b / a) * 2 - 1) break else: ans += int(b // a) * a * 2 a, b = b % a, a print(ans)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s923560019
p04048
Wrong Answer
n, x = map(int, input().split()) total = n a = x b = n - x while a > 0: total += (a * 2) * (b // a) a, b = b % a, a if n % 2 == 0: print(total) else: print(total - 1)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s337533766
p04048
Wrong Answer
n, x = map(int, input().split()) total = n a = x b = n - x while a > 0: total += (a * 2) * (b // a) a, b = b % a, a print(total - 1)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s105471540
p04048
Wrong Answer
n,x=map(int,raw_input().split()) if n<x: tmp=n n=x x=tmp print 3*(n-1)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s531609943
p04048
Wrong Answer
n,x=map(int,raw_input().split()) print 3*(n-1)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s320666076
p04048
Wrong Answer
N,X=map(int,input().split()) def f(a,b): if a>b: return f(b,a) if b%a==0: return a*(2*(b//a) + 1) return 2*(b//a) + f(b%a,a) print(N+f(X,N-X))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s715303468
p04048
Wrong Answer
def f(a,b): if a>b: return f(b,a) if b%a==0: return a*(2*(b//a) + 1) return 2*(b//a) + f(b%a,a) N,X=map(int,input().split()) print(N+f(X,N-X))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s642017979
p04048
Wrong Answer
n, x = map(int, input().split()) i = n - x j = 1 ret = x while (i > 0): ret += i*j i -= 1 j += 1 print(ret)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s163263304
p04048
Wrong Answer
#!usr/bin/env python3 from collections import defaultdict from heapq import heappush, heappop import sys import math import bisect import random def LI(): return list(map(int, sys.stdin.readline().split())) def I(): return int(sys.stdin.readline()) def LS():return list(map(list, sys.stdin.readline().split())) def S(): ...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s392769165
p04048
Wrong Answer
n,x = map(int,input().split()) def gcd(a,b): if a%b == 0: return b else: return gcd(b,a%b) k = gcd(n,x) if k == 1: print((n-1)*3) else: print((int(n/k)-1)*3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s573674066
p04048
Wrong Answer
def main(): n,x=map(int,input().split()) a,b=n-x,x if(a<b): a,b=b,a path_length = calc_path(a,b,n) print(path_length) def calc_path(a1,b1,c1): q , mod=divmod(a1,b1) count=0 if mod==0: print(c1) c2=c1+2*b1*q-b1 print(c2) return c2 else: ...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s181561582
p04048
Wrong Answer
def main(): n,x=map(int,input().split()) a,b=n-x,x if(a<b): a,b=b,a path_length = calc_path(a,b,n) print(path_length) def calc_path(a1,b1,c1): q , mod=divmod(a1,b1) count=0 if mod==0: c2=c1+2*b1+1 return c2 else: count=count+1 c2=c1+2*b1*q ...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s860269408
p04048
Wrong Answer
def main(): n,x=map(int,input().split()) a,b=n-x,x if(a<b): a,b=b,a path_length = calc_path(a,b,n) print(path_length) def calc_path(a1,b1,c1): q , mod=divmod(a1,b1) count=0 if mod==0: c2=c1+b1*(q+1) return c2 else: count=count+1 c2=c1+b1*(q+...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s299217751
p04048
Wrong Answer
N, X = map(int, input().split()) print(4 * int(N - X))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s627215655
p04048
Wrong Answer
N, X = map(int, input().split()) print(X * 6)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s573973190
p04048
Wrong Answer
n, x = map(int, input().split()) if n % 2: print((n-1)*3) else: print(max(n-x, x)*3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s736007811
p04048
Wrong Answer
n, x = map(int, input().split()) if n % 2: print(3 * (n - 1)) else: if x <= n // 2: print(3 * (n - x)) else: print(3 * x)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s449334981
p04048
Wrong Answer
N, X = [int(n) for n in input().split()] l = N - X s = X cost = N while(l % s != 0): cost += 2 * s l, s = s, l - s print(cost + l + s)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s136913283
p04048
Wrong Answer
def gcd(a, b): if b == 0: return a else: return gcd(b, a%b) n, x = map(int, input().split()) print(3*gcd(n, x))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s561951220
p04048
Wrong Answer
#x, N-x, x #N-x-x N,x = list(map(int, input().split())) ll = 0 if x*2 < N: ll = x + N if (N-x*2) == x: ll += 2*x elif (N-2*x) > x: ll += (N-x*2)/x * 2*x else : ll += x + x/(N-x*2)*2-(N-x*2) elif x*2 == N: ll = x + x + x else: ll = x ll += x/(N-x)*2*(N-x) print(int(ll)...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s088348921
p04048
Wrong Answer
#x, N-x, x #N-x-x N,x = list(map(int, input().split())) ll = 0 if x*2 < N: ll = x + N if (N-x*2) == x: ll += 2*x elif (N-2*x) > x: ll += (N-x*2)/x * 2*x else : ll += x + x/(N-x*2)*2-(N-x*2) elif x*2 == N: ll = x + x + x else: ll = x ll += x/(N-x)*2 print(int(ll))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s593831199
p04048
Wrong Answer
import sys sys.setrecursionlimit(100000) from math import floor n,x=map(int,input().split()) ans=0 def f(x,y): if y%x==0: return y//x*2-x return 2*x*(y//x)+f(y%x,x) print(n+f(min(x,n-x),max(x,n-x)))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s370842368
p04048
Wrong Answer
import sys sys.setrecursionlimit(10**7) N,X=map(int,input().split()) def f(a,b): if a>b: return f(b,a) if a==b: return a if a==0: return 0 if a==1: return b return 2*a*(b//a)+f(b%a,b) print(N+f(X,N-X)) #print(f(3,2),f(3,1))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s622072658
p04048
Wrong Answer
a,b = map(int,input().split()) if b < (a-b): print(4*a-4*b) else: print(4*a-3*b)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s995536695
p04048
Wrong Answer
n,x = (int(i) for i in input().split()) if 2*x ==n :ans = 3*x else:ans = 4*x +4*abs((n-2*x)) print(ans)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s647426804
p04048
Wrong Answer
a = input().rstrip().split(" ") N = int(a[0]) X = int(a[1]) l = X * 4 + (N - 2 * X) * 4 print(l)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s738463034
p04048
Wrong Answer
li = [int(i) for i in input().split(" ")] res = (li[0]-1) * 3 print(res)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s715961598
p04048
Wrong Answer
N,X = map(int,input().split()) ans = 2*N + X print(ans)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s805855603
p04048
Wrong Answer
import sys sys.setrecursionlimit(100000) def inpl(): return list(map(int, input().split())) N, X = map(int, input().split()) def calc(A, B, i): d, m = divmod(A, B) if m == 0: tmp = (2*d-(i != 0))*B return tmp else: tmp = (2*d+1-(i!=0))*B tmp += calc(B, m, (i+1)%3) re...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s797683063
p04048
Wrong Answer
import sys sys.setrecursionlimit(1000000) def inpl(): return list(map(int, input().split())) N, X = map(int, input().split()) def calc(A, B, i): d, m = divmod(A, B) if m == 0: tmp = (2*d-(i%3 > 0))*B return tmp else: tmp = (2*d+1-i)*B tmp += calc(B, m, (i+1)%3) retu...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s036340270
p04048
Wrong Answer
import sys stdin = sys.stdin sys.setrecursionlimit(10**8) def li(): return map(int, stdin.readline().split()) def li_(): return map(lambda x: int(x)-1, stdin.readline().split()) def lf(): return map(float, stdin.readline().split()) def ls(): return stdin.readline().split() def ns(): return stdin.readline().rstrip(...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s168943368
p04048
Wrong Answer
n,x= list(map(int,input().split(" "))) y = n-x s = n while x % y !=0 or y % x != 0 : if x>y: s +=2* (x//y) x %= y else: s += 2*(y//x) y %= x if x*y==0: break s+= x+y print( s)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s926180917
p04048
Wrong Answer
N, X = map(int ,input().split()) if X==N/2: print(3*X) else : if X>N/2: X = N-X L = X + (N-X) + X rest_ab = N-2*X while rest_ab > X: L += 2*X # print('>X',L) rest_ab -= X if rest_ab == X: L += 2*X elif rest_ab < X: # print('rest_ab=', rest_ab...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s513457636
p04048
Wrong Answer
value = input() values = value.split() N = int( values[0] ) X = int( values[1] ) shorter = min([X,N-X]) longer = max([X,N-X]) length = 0 while shorter>0 and longer >0 : length = int(longer/shorter)*3*shorter sho = longer/shorter amari = longer%shorter longer = shorter sho...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s942903940
p04048
Wrong Answer
import sys value = input() values = value.split() N = int( values[0] ) X = int( values[1] ) #N = int(sys.argv[1]) #X = int(sys.argv[2]) #print(sys.argv) rect = [ X, N-X ] rect_temp = rect length = 0 while rect_temp[0] > 0 and rect_temp[1] > 0 : if rect_temp[0] < rect_temp[1]: length += rect_temp[0]*...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s437465010
p04048
Wrong Answer
value = input() values = value.split() N = int( values[0] ) X = int( values[1] ) rect = [ X, N-X ] rect_temp = rect length = 0 while True : if rect_temp[0] < rect_temp[1]: length += rect_temp[0]*3 rect_temp = [ rect_temp[0], rect_temp[1]-rect_temp[0] ] elif rect_temp[0] > rect_temp[1]: ...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s779272697
p04048
Wrong Answer
# your code goes here from math import floor N, X = [int(x) for x in input().split()] y = N-X x = X L = X while x > 0: # k = 2*floor(y/x) k, z = divmod(y, x) dL = x*(2*k-1)+y L += x*(2*k-1)+y print(x, y, k, dL) y, x = (x, z) #L += y print(L)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s663435651
p04048
Wrong Answer
# your code goes here from math import floor N, X = [int(x) for x in input().split()] y = N-X x = X L = X while x > 0: k = 2*floor(y/x) L += x*k # print(x, y, k, L) y, x = (x, y-x) print(L)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s178776627
p04048
Wrong Answer
from math import floor N, X = [int(x) for x in input().split()] print(N, X) x0 = N x1 = X x2 = x0-x1 L = 2*X c = 1 while x2 > 0: k = floor(x0/(x1/2))-1 L += x1*k x0, x1, x2 = (x1, x2, x0-x1) print(L)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s215261349
p04048
Wrong Answer
N,X = map(int,input().split()) ans = X + (N-X) + X*2 + (N-2*X)*3 print(ans) #print(X,N-X,X,N-2*X,N-2*X,N-2*X)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s318929054
p04048
Wrong Answer
import sys sys.setrecursionlimit(10**7) def f(a,b): if a==b:return a if not a<b:a,b=b,a return 2*(b//a)*a+f(a,b%a) if b%a else 2*(b//a)*a-1 N,X=map(int,input().split()) print(f(X,N-X)+N)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s592824914
p04048
Wrong Answer
N, X = map(int, input().split()) if X == N//2: print(N//2 * 3) elif N % X == 0: a = max(N-X, X) b = min(N-X, X) print(a + a // b * 2) else: print(0)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s787945232
p04048
Wrong Answer
import math def func(a,b): if a<=b : if b%a > 0: return 2*math.floor(b/a)*a+func(a,b%a) else: return 2*math.floor(b/a)*a-1 else: return func(b,a) N,X = map(int,input().split()) dis =N dis += func(N-X,X) print(dis)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s391952222
p04048
Wrong Answer
#最大公約数 def gcd(a,b): if a==b: return b elif b==1: return 1 else: return gcd(b,a%b) def func(a,b): if a<=b : if b%a > 0: return 2*(b//a)*a+func(a,b%a) else: return 2*(b//a)*a-1 else: return func(b,a) N,X = map(int,input().split(...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s728356052
p04048
Wrong Answer
n,x=map(int,input().split()) print(n*24/10)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s741251563
p04048
Wrong Answer
n,x=map(int,input().split()) print(x+(n-x)+x+x+(n/2)*3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s177768964
p04048
Wrong Answer
n,x=map(int,input().split()) print(int(n + (7*x) / 2))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s874964161
p04048
Wrong Answer
N,X=map(int, input().split()) ans=0 if X ==N/2: ans = 3*N/2 elif X> N/2: ans = 3*X else: ans = 3*X + X + 2*X print(ans)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s007082882
p04048
Wrong Answer
n,x = map(int,input().split()) if x == n/2: ans = x*3 else: ans = (n-1)*3 print(ans)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s197720527
p04048
Wrong Answer
import sys stdin = sys.stdin sys.setrecursionlimit(10**5) def li(): return map(int, stdin.readline().split()) def li_(): return map(lambda x: int(x)-1, stdin.readline().split()) def lf(): return map(float, stdin.readline().split()) def ls(): return stdin.readline().split() def ns(): return stdin.readline().rstrip() d...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s905854439
p04048
Wrong Answer
from collections import defaultdict, Counter from itertools import product, groupby, count, permutations, combinations from math import pi, sqrt from collections import deque from bisect import bisect, bisect_left, bisect_right from string import ascii_lowercase from functools import lru_cache import sys sys.setrecursi...
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s767069642
p04048
Wrong Answer
n,x=map(int,input().strip().split()) y=n-x an=y+x*3+(n-2*x)*3 print(an)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s010136535
p04048
Wrong Answer
n,x=map(int,input().strip().split()) y=n-x an=y+x*3+x/2*3 print(an)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s429823440
p04048
Wrong Answer
import sys def main(): n, x = map(int, input().split(' ')) print((n-x)*3) main()
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s838415596
p04048
Wrong Answer
a,b = map(int,input().split()) s = a/b print(3*b*(s-1))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s245218189
p04048
Wrong Answer
n, x = map(int, input().split()) if n % x == 0: nn = int(n / x) print((nn - 1)* 3 *x) else: print((n-1)*3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s924209593
p04048
Wrong Answer
n, x = map(int, input().split()) if n / x == 2: print(x*3) else: print((n-1)*3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s759293452
p04048
Wrong Answer
n, x = map(int, input().split()) if int(n / x) == (n / x): print(x*3) else: print(n+x+n)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s479814691
p04048
Wrong Answer
n, x = map(int, input().split()) if n / x == 2: print(x*3) else: print(n+x+n)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s755534772
p04048
Wrong Answer
n,m=map(int,input().split()) print(int(3*(n-1)) if (n-1)%2==0 else int(abs(m-n/2)*3+3*(n)/2))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s289917534
p04048
Wrong Answer
n,m=map(int,input().split()) print(3*n if n%2==0 else abs(m-(n+1)/2)*3+3*(n+1)/2)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s411933676
p04048
Wrong Answer
n,x = map(int,input().split()) print((x+n%(n-x)) * 3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s663659593
p04048
Wrong Answer
n,x = map(int,input().split()) if n % x == 0 or n % (n-x) == 0: print(max(x,n-x) * 3) else: print(min(x,n-x) * 6)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s733657091
p04048
Wrong Answer
n,x = map(int,input().split()) print(3*min(x,n-x) * (1 + min(n%(n-x),n%x)))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s946372486
p04048
Wrong Answer
n,x = map(int,input().split()) print(3 * max(n-x,x) + 3 * (n % x))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s735459848
p04048
Wrong Answer
n,x = map(int,input().split()) print(3 * (n-x) + 3 * (n % x))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s248871649
p04048
Wrong Answer
L = input() L = L.split() n = int(L[0]) x = int(L[1]) if (n % 2 == 1): print(3*(n-1)) else: if (x < n/2): print(int(3*(n-1)-(n/2)*(x-1))) elif(x == n/2): print(int(3*x)) else: print(int(3*(n-1)-(n/2)*(n-x-1)))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s919439470
p04048
Wrong Answer
N,X = map(int,input().split()) print(N*3-3)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s908573544
p04048
Wrong Answer
N, X = map(int, input().split()) path = N a, b = X, N - X if a < b: a, b = b, a while b > 0: print(a, b) path += b * (a // b) * 2 a, b = b, a % b path -= a print(path)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s847397379
p04048
Wrong Answer
n, x = map(int, input().split()) #divs = [x] ans = n while n % x != 0: ans += 2 * (n // x) * x n , x = x, n % x ans -= x print(ans)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s569235684
p04048
Wrong Answer
n, x = map(int, input().split()) #divs = [x] ans = n while n % x != 0: ans += 2 * ((n - 1) // x) * x n , x = x, n % x ans -= x print(ans)
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...
s362282024
p04048
Wrong Answer
[N, X] = list(map(int, input().split())) if(X == N/2): print(int(N*3/2)) else: print(int((N-1)*3))
5 2
12
<span class="lang-en"> <p>Score : <var>500</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is conducting an optical experiment using mirrors and his new invention, the rifle of <em>Mysterious Light</em>.</p> <p>Three mirrors of length <var>N</var> are set so that they form an equilatera...