submission_id
string
problem_id
string
status
string
code
string
input
string
output
string
problem_description
string
s742049259
p04047
Runtime Error
n=int(input()) l=list(map(int,input().split())) l.sort() sum=0 for x in range(0,n*2+1,2): sum+=min(l[x:x+2]) print(sum)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s853478988
p04047
Runtime Error
def gcd(a,b): if b == 0: return a return gcd(b,a%b) N,k = map(int,raw_input().split()) #k = int(raw_input()) #A = map(int, raw_input().split()) ans = gcd(N,k) print 3*(N - ans)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s866647203
p04047
Runtime Error
N = int(raw_input()) A = map(int, raw_input().split()) sum = 0 A.sort() A = A[::2] print sum(A)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s786927693
p04047
Runtime Error
N = input() kushi = sorted(list(map(int, input().split()))) even = kushi[0::2] print(sum(even)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s862646417
p04047
Runtime Error
n = int(input()) L = map(int, input().split(" ")) L_sorted = sorted(L) pairs = [] for index in range(0, len(L_sorted)/2, 2): pairs.append(L_sorted[index : index +2]) answer = sum( min(x) for x in pairs) print(answer)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s233463928
p04047
Runtime Error
ii=lambda:map(int,raw_input().split()) n,k=ii() T,F=True,False e=[[] for _ in range(n)] for _ in range(n-1): a,b=ii() e[a-1]+=[b-1];e[b-1]+=[a-1] cost=[0]*n ans=10**5 def dfs(x,f): if f>=0:vis[f]=T q=[(x,0)] while len(q): v,c=q.pop(0) if c>k/2:break cost[v]=c;vis[v]=T ...
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s524941267
p04047
Runtime Error
N = int(input()) L = map(int, input().split()) sort(L) sum = 0 for i in range(0,len(L),2): sum += L[i] print(sum)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s046243738
p04047
Runtime Error
N = int(input()) L = map(int, input().split()) sort(L) sum = 0 for i in range(0,N): sum += L[i*2] print(sum)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s203588797
p04047
Runtime Error
N = int(input()) L = map(int, input().split()) sort(L) sum = 0 for i in range(0,len(L),2): sum += L[i] print(sum)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s546655394
p04047
Runtime Error
n, x = map(int, raw_input().split()) def cal(n): return n + 1 + (n - 2)*2 if n % x == 0: l = cal(n) - cal(x) else: l = cal(n) print l
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s421375316
p04047
Runtime Error
n = raw_input() l = raw_input().split() print(sum(sorted(l, reverse=True)[1::2]))
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s457272852
p04047
Runtime Error
NX = input() NX = "".join(NX).split(" ") NX = [int(s) for s in NX] D = NX[0]-NX[1] if NX[0] ==0 or NX[1]==0: print(str(0)) if NX[1]<D: Mod = D%NX[1] if Mod!=0: print(int(2*NX[1]+NX[1]+(D-NX[1]/2)*3)) else: print(int(NX[1]*4+D)) elif NX[1]==D: print(int(3*NX[1])) elif NX[1]>D: Mod = NX[1]%D if Mod!=0: prin...
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s078375409
p04047
Runtime Error
#!/usr/bin/python3 import sys sys.setrecursionlimit(100000) N, X = list(map(int, input().split())) def f(a,b): if a > b: a,b = b,a if a==0 or b==0: return 0 if b%a is 0: return int(a*(2*(b/a)-1)) return int(2*a*int(b/a) + f(a,b%a)) print(N+f(N-X, X))
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s170659470
p04047
Runtime Error
n, x = map(int,input().split()) if x > n // 2: x = n - x xx = x yy = n - x ans = n i = 0 while True: ans += 2 * (yy // xx) * xx yy %= xx if yy == 0: ans -= xx break if yy < xx: tmp = xx xx = yy yy = tmp print(ans)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s849507092
p04047
Runtime Error
import sys sys.setrecursionlimit(10**6) def dfs1(s,c): visited[s]=1 for i in v[s]: if visited[i]==0: d[c][i]=d[c][s]+1 dfs1(i,c) return def dfs2(c1,c2): visited[c2]=1 dfs1(c1,c1) dfs1(c2,c2) return n,k=map(int,raw_input().split()) d=[[0]*n for _ in xrange(n...
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s226244380
p04047
Runtime Error
def gcd(a,b): if b==0: return a else: return gcd(b,a%b) n,x=map(int,raw_input().split()) print 3*(n-gcd(n,x))
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s704341736
p04047
Runtime Error
def gcd(a,b): if b==0: return a else: return gcd(b,a%b) n,x=map(int,raw_input().split()) print 3*(n-gcd(n,x))
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s006997741
p04047
Runtime Error
n,x = map(int,raw_input().split()) print '%d' %(n + ((n/x) - 1)*2*x + 3*(n%x))
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s512345524
p04047
Runtime Error
n,x = map(int,raw_input().split()) if n > 2*x : print '%d' %(n + (n/x - 1)*2*x + 3*(n-(n/x)*x)) else : print '%d' %(n + x)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s502251886
p04047
Runtime Error
import scipy.misc as scm def combi(p,q): return scm.comb(p,q,1) ans=0 n=int(input()) k=[] for i in range(n): a,b=map(int,input().split()) k.append([a,b]) for i in range(n-1): for j in range(i+1,n): p=k[i][0]+k[i][1]+k[j][0]+k[j][1] q=k[i][0]+k[j][0] ans += combi(p,q) % (10**9+7...
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s852666915
p04047
Runtime Error
def f(a, b): if b%a==0: return b//a*2-1 else: return b//a*a*2+f(b%a,a) N, X = map(int, input().split()) ans = N + f(min(N-X,X), max(N-X,X)) print(ans)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s415818222
p04047
Runtime Error
N = input() L = input() i = 0 array = [] anser = 0 while i < len(L): if L[i] != ' ': array.append(int(L[i])) i+=1 i = 1 array.sort(reverse=True) for i in range(array): if i // 2 == 0: anser+=i print(anser)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s282052365
p04047
Runtime Error
import sys; n,x=map(int,raw_input().split()); if(2*x<n): print x+(n-x)+x+x+(n-2*x)*(2*x-1); elif(2*x==n): print x+(n-x)+x; else: print x+(n-x)+x+(n-x)+x+(n-x);
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s680582353
p04047
Runtime Error
# encoding: utf-8 n, x = map(int, raw_input().split()) ac_bc = n - x s = ac_bc / 3 l = ac_bc - s print ac_bc + s * 3 + l * 3
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s911514871
p04047
Runtime Error
#!/usr/bin/env python3 # -*- coding: utf-8 -*- N, X = list(map(int, input().split())) sum_ = X prev = X next = N - X i = 0 while True: num = prev // next if i == 0: sum_ += 2 * num * next elif i % 2 == 1: sum_ += 2 * num * next - next else: sum_ += 2 * num * next - next mod_ ...
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s280459736
p04047
Runtime Error
N, X = map(int, raw_input().split()) ans = 0 if N%2 ==0: d = min(X, N-X) ans = (N-d)*3 else: ans = (N-1)*3 print(ans)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s646624473
p04047
Runtime Error
N, X = map(int, raw_input().strip().split()) print N + (N-X)*2 -1
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s529211517
p04047
Runtime Error
N, x = map(long, raw_input().split()) print (N - x) + 3 * x + 3 * (N - x - x)
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s948258491
p04047
Runtime Error
#! /usr/bin/env python3 N, X = map(int, input().split()) if X*2 == N: print(X*3) else: print(X*3*((N-X)//X + (1 if (N-X)%X>0 else 0)))
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s902533382
p04047
Runtime Error
def bbq(): n = int(input()) a = input() tmp = a.split() l = [int(x) for x in tmp] l.sort() n = 0 i = 0 while(i<n: n += l[i] i += 2 print (n) if __name__ == "__main__": bbq()
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s820627721
p04047
Runtime Error
N=raw_input() up=raw_input() up=up.split() up=map(int,up) up.sort() count=0 for i in range(N): count+=up[i*2] print count
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s777010165
p04047
Runtime Error
N=raw_input() up=raw_input().split() up=map(int,up) up.sort() count=0 for i in range(N): count+=up[i*2] print count
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s090382957
p04047
Runtime Error
N=raw_input() up=raw_input().split() up=up.sort() count=0 for i in range(N): count+=int(up[i*2]) print count
2 1 3 1 2
3
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Snuke is having a barbeque party.</p> <p>At the party, he will make <var>N</var> servings of <em>Skewer Meal</em>.</p> <div style="text-align: center;"> <img src="https://agc001.contest.atcoder.jp/img/a...
s568266599
p04048
Wrong Answer
n,x=map(int,input().split()) def f(a,b): if a>b: b,a=a,b if b%a==0: return 2*(b//a)-1 return 2*a*(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...
s403994981
p04048
Wrong Answer
N, X = list(map(int, input().split())) ans = N N, X = X, N - X while N and X: if X > N: d, m = divmod(X, N) if m == 0: ans += (d * 2 - 1) * N else: ans += d * 2 * N N, X = N, m else: d, m = divmod(N, X) ans += (d * 2 - 1) * X + m * 2 N, X = m, X - m 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...
s758022949
p04048
Wrong Answer
N, X = list(map(int, input().split())) ans = N N, X = X, N - X while N and X: if X > N: d, m = divmod(X, N) ans += d * 2 * N N, X = N, m else: d, m = divmod(N, X) ans += (d * 2 - 1) * X + m * 2 N, X = m, X - m 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...
s743451192
p04048
Wrong Answer
N, X = list(map(int, input().split())) ans = N N, X = X, N - X while N and X: if X > N: d, m = divmod(X, N) ans += d * 2 * N N, X = N + m, X - d * N else: d, m = divmod(N, X) ans += d * X + m * 2 N, X = m, X - m 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...
s558618129
p04048
Wrong Answer
n,x=map(int,input().split()) print(4*n-4*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...
s754397376
p04048
Wrong Answer
import math n,x = map(int,input().split()) a = n+(n-x)//x*x*2 b = math.gcd(n-x,x) if b == x: print(a-x) else: print(int(a+(x/b*2-1)*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...
s943933326
p04048
Wrong Answer
import math n,x = map(int,input().split()) a = n+(n-x)//x*x*2 b = math.gcd(n-x,x) if b == x: print(a-x) else: print(a+(x*2-1)*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...
s740839397
p04048
Wrong Answer
import math n,x = map(int,input().split()) a = n+(n-x)//x*x*2 b = math.gcd(n-x,x) if b == x: print(a-x) else: print(a+b*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...
s325881403
p04048
Wrong Answer
import math n,x = map(int,input().split()) print(n+(n-x)//x*x*2+math.gcd(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...
s917545372
p04048
Wrong Answer
import math n,x = map(int,input().split()) print(n+n//x*x+math.gcd(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...
s089149886
p04048
Wrong Answer
def make_divisors(n): lower_divisors , upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i: upper_divisors.append(n//i) i += 1 return lower_divisors + upper_divisors[::-1] n,x = map(int,input().spli...
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...
s812722017
p04048
Wrong Answer
n,x = map(int,input().split()) ans = x e = n-x count = 0 while True: if x%e == 0: if count == 0: ans += x//e*(e*2) else: ans += x//e*(e*2)-e break else: if count%2 == 0: ans += e+(x//e)*e*2 else: ans += (x//e)*e*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...
s498114164
p04048
Wrong Answer
n,x=map(int,input().split()) ans=0 t=n-x tt=x//t ans+=x while True: if x%t==0: ans+=tt*t*2 print(ans) exit() else: ans+=tt*t*2+t x=t t=n-t*tt tt=x//t
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...
s871038270
p04048
Wrong Answer
n,x = map(int, 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...
s103575194
p04048
Wrong Answer
n, x = map(int, input().split()) print(3 * x if n / x == 2 else 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...
s299822992
p04048
Wrong Answer
a = list(map(int,input().split())) print((a[0]*(a[1]*2)) - (a[1]*(a[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...
s264325437
p04048
Wrong Answer
a = list(map(int,input().split())) print((a[0]*4) - (a[1]*4))
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...
s269110796
p04048
Wrong Answer
a = list(map(int,input().split())) print(a[0]*4 + a[1]*4)
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...
s027361320
p04048
Wrong Answer
a = list(map(int,input().split())) print(a[0] * 4, a[1] * 4)
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...
s051870114
p04048
Wrong Answer
N, X = [int(x) for x in input().split()] #answer = if N//2 >= X: print(X + N-X + X + X + 2*X-1) else: #N//2 < X 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...
s945749631
p04048
Wrong Answer
N,X = input().split() N,X = int(N), int(X) answer = X+ (N-X) def rhombus(N,X): if X==1: return N+1 if X==0: return 0 if N%X == 0: return X*(N//X)*2-X else: k = N//X return k*2*X + rhombus(X,N-(k*X)) answer = answer + rhombus(N-X,X) print(answe...
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...
s569920223
p04048
Wrong Answer
N,X = input().split() N,X = int(N), int(X) answer = X+ (N-X) def rhombus(N,X): if X==1: return N+1 if X==0: return 0 if N%X == 0: return X*(N//X)*2-1 else: k = N//X return k*2*X + rhombus(X,N-(k*X)) answer = answer + rhombus(N-X,X) print(answe...
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...
s621976865
p04048
Wrong Answer
N,X = input().split() N,X = int(N), int(X) answer = X+ (N-X) def rhombus(N,X): if X==1: return N+1 if X==0: return 0 if N%X == 0: return (N//X)*2-1 else: k = N//X return k*2*X + rhombus(X,N-(k*X)) answer = answer + rhombus(N-X,X) print(answer)
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...
s728596325
p04048
Wrong Answer
n, x = list(map(int, input().split())) ans = 3 * 3 * x / 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...
s131789971
p04048
Wrong Answer
n,x=map(int,input().split()) print(4*(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...
s455302537
p04048
Wrong Answer
n, x = [int(i) for i in input().split()] print(int(x + (n-x) + x + x + x/2 + x/2 + 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...
s435063224
p04048
Wrong Answer
N, X = map(int, input().split()) print(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...
s694880264
p04048
Wrong Answer
N,X=map(int,input().split()) if N%X==0: print((N-X)*3) else: 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...
s488084319
p04048
Wrong Answer
N,X=map(int,input().split()) if N%2==0 and N//2==X: print(3*X) else: 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...
s242667221
p04048
Wrong Answer
N, X = map(int, input().split()) ans = X base = N - X elem = X while True: div, mod = divmod(base, elem) ans += div * elem * 2 if mod == 0: ans += base break base = elem elem = mod 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...
s656275378
p04048
Wrong Answer
n,x=map(int,input().split()) if n<=2*x:print(int(1.5*x)) else: k=(2*(x/(n-2*x)))*(n-2*x) ans=4*x+k print(int(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...
s507309030
p04048
Wrong Answer
n,x=map(int,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...
s621283558
p04048
Wrong Answer
n,x=map(int,input().split()) print(3*x+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...
s617177741
p04048
Wrong Answer
import sys input = sys.stdin.readline N, X = map(int, input().split()) def solve(n, x): if n == 0: return 0 if x == 1: return n * 3 m = x y = n - n // x * x if y == 0: return n // x * x * 3 return solve(m, y) + y * 3 * x print(solve(max(N - X, X), min(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...
s335049700
p04048
Wrong Answer
from collections import deque from heapq import heapify,heappop,heappush,heappushpop from copy import copy,deepcopy from itertools import permutations,combinations from collections import defaultdict,Counter # from math import gcd # from fractions import gcd from functools import reduce from pprint import pprint def m...
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...
s658592611
p04048
Wrong Answer
from collections import deque from heapq import heapify,heappop,heappush,heappushpop from copy import copy,deepcopy from itertools import permutations,combinations from collections import defaultdict,Counter # from math import gcd # from fractions import gcd from functools import reduce from pprint import pprint def m...
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...
s075102699
p04048
Wrong Answer
from collections import deque from heapq import heapify,heappop,heappush,heappushpop from copy import copy,deepcopy from itertools import permutations,combinations from collections import defaultdict,Counter # from math import gcd # from fractions import gcd from functools import reduce from pprint import pprint def m...
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...
s026962585
p04048
Wrong Answer
from collections import deque from heapq import heapify,heappop,heappush,heappushpop from copy import copy,deepcopy from itertools import permutations,combinations from collections import defaultdict,Counter # from math import gcd # from fractions import gcd from functools import reduce from pprint import pprint def m...
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...
s428390220
p04048
Wrong Answer
n,x=map(int,input().split()) a=n-x b=a-x s=x+a+x+x+b+b+b 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...
s338691775
p04048
Wrong Answer
def examA(): N = I() L = LI() L.sort() ans = sum(L[::2]) print(ans) return def examB(): N, X = LI() ans = N-X while(X>0): ans += (2 * (N//X) - 1) * X #print(ans,N,X) next_N = X next_X = N%X N = next_N X = next_X print(ans) 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...
s680770749
p04048
Wrong Answer
N,X = map(int,input().split()) print(N*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...
s923034079
p04048
Wrong Answer
n,x=map(int,input().split()) if x < n/2: print(n + int(3.5 * x)) elif x == n/2: print(3 * x) else: if x % (n-x) == 0: print((n-x) * 3 * (x // (n-x))) else: q=n-x r= x % (n-x) ans = (n-x) * ((x//(n-x))*3 + 1) while r != 0: if q % r == 0: ans += ((q//r - 1) * 2 + 1) * r r...
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...
s730724643
p04048
Wrong Answer
n,x=map(int,input().split()) if x < n/2: print(n + 3.5 * x) elif x == n/2: print(3 * x) else: if x % (n-x) == 0: print((n-x) * 3 * (x // (n-x))) else: q=n-x r= x % (n-x) ans = (n-x) * ((x//(n-x))*3 + 1) while r != 0: if q % r == 0: ans += ((q//r - 1) * 2 + 1) * r r=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...
s541085462
p04048
Wrong Answer
num = [int(x) for x in input().split()] N = num[0] X = num[1] result = N a = N -X b = X if a < b: c = a a = b b = c while b >= 1: result += (2*(a//b))*b c = a%b a = b b = c print(result)
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...
s742191763
p04048
Wrong Answer
Input_num = [int(x) for x in input().split()] N = Input_num[0] X = Input_num[1] Total_Length = 2*X + N + 3*(X//2) print(Total_Length)
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...
s219732171
p04048
Wrong Answer
def run(): N, X = map(int, input().split()) y = N-X ans = N while True: y, X = max(y, X), min(y, X) a = y//X ans += a*X*2 if y%X == 0: break y, X = X, a print(ans-X) if __name__ == '__main__': run()
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...
s715345696
p04048
Wrong Answer
n,x = [int(i) for i in input().split()] length = n n=n-x while True: if x==0: length-=x break t=n//x length+=2*t*x a=n n=x x=a-t*x print(length)
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...
s506811118
p04048
Wrong Answer
n,x = [int(i) for i in input().split()] length = n n=n-x while True: if x==0: break t=n//x length+=2*t*x a=n n=x x=a-t*x print(length)
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...
s747448111
p04048
Wrong Answer
N,X = map(int,input().split()) if X<=N/2: print(4*(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...
s295660787
p04048
Wrong Answer
n,x = map(int,input().split()) print(x*3 + (n-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...
s085277730
p04048
Wrong Answer
import sys, re from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians from itertools import permutations, combinations, product from operator import itemgetter, mul from copy import deepcopy from string import ascii_lowercase, ascii_uppercase, digits fro...
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...
s585033086
p04048
Wrong Answer
n, x = map(int, input().split()) print(2 * 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...
s233090013
p04048
Wrong Answer
n, x = map(int, input().split()) ans = n wall_side = n - x light_length = n - (n - x) while True: if wall_side % light_length == 0: ans += (wall_side // light_length - 1) * 2 + 1 break else: ans += 2 * (wall_side // light_length) * light_length wall_side, light_length = light_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...
s033188772
p04048
Wrong Answer
n,x=map(int,input().split()) if n-3*x>0: total=2*n else: total=n+4*x-1 print(total)
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...
s791604642
p04048
Wrong Answer
# -*- coding: utf-8 -*- import sys def input(): return sys.stdin.readline().strip() def list2d(a, b, c): return [[c] * b for i in range(a)] def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)] def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(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...
s097379139
p04048
Wrong Answer
n, x = map(int, input().split()) a, b = max(n-x,x),min(n-x,x) res = a+b while b!=0: q = a/b r = a%b res += (b*2)*q if (r==0): res -= b a, b = b, r 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...
s548884385
p04048
Wrong Answer
n, x = map(int, input().split()) ans = 0 a, b = max(n-x,x),min(n-x,x) res = a+b while b: q = a/b r = a%b res += (b*2)*q if (r==0): res -= b a, b = b, r 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...
s697199411
p04048
Wrong Answer
n, x = map(int, input().split()) if (n%2 == 1): print((n-1)*3) elif (n==2): print(3) else: k=n/2 if (x<k): print(int((k*3)+(3*(k-x)))) elif(x==k): print(int(k*3)) else: print(int((k*3)+(3*(k-(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...
s578443542
p04048
Wrong Answer
n, x = map(int, input().split()) if (n%2 == 1): print((n-1)*3) elif (n==2): print(3) else: k=n//2 if (x<k): print(int((n-x)*k)) elif(x==k): print(int(k*3)) else: print(int(x*k))
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...
s311364778
p04048
Wrong Answer
n, x = map(int, input().split()) if (n%2 ==1): print((n-1)*3) elif (n==2): print(3) else: k=n/2 if (x<k): print((n-x)*k) elif(x==k): print(k*3) else: print(x*k)
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...
s212457501
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...
s991997867
p04048
Wrong Answer
n, x = map(int, input().split()) ans = [] for i in range(1,n): k=i*3 ans.append(k) print(ans[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...
s734543112
p04048
Wrong Answer
N, X = input().split() print(3 * (int(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...
s475209552
p04048
Wrong Answer
N, X = input().split() print(3 * int(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...
s822445461
p04048
Wrong Answer
N, X = input().split() print(6 * int(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...
s446368918
p04048
Wrong Answer
import sys import heapq from operator import itemgetter from collections import deque, defaultdict from bisect import bisect_left, bisect_right input = sys.stdin.readline sys.setrecursionlimit(10 ** 7) MOD = 10**9 + 7 def sol(): N, X = map(int, input().split()) if X * 2 > N: print(3 * X) elif 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...
s100697335
p04048
Wrong Answer
import sys import heapq from operator import itemgetter from collections import deque, defaultdict from bisect import bisect_left, bisect_right input = sys.stdin.readline sys.setrecursionlimit(10 ** 7) MOD = 10**9 + 7 def sol(): N, X = map(int, input().split()) if X * 2 > N: print(2 * 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...