s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s363884820 | p03544 | u593567568 | 1595538342 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9164 | 108 | N = int(input())
L = [0] * 87
L[0] = 2
L[1] = 1
for i in range(2,88):
L[i] = L[i-1] + L[i-2]
print(L[N]) |
s248230938 | p03544 | u075303794 | 1595419708 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9024 | 87 | N=int(input())
L=[2,1]
for i in range(2,N):
L.append(L[i-1]+L[i-2])
print(L[N+1])
|
s102378853 | p03544 | u694665829 | 1594391545 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9104 | 80 | n=int(input())
a=[2,1]
for i in range(84):
a.append(a[i]+a[i+1])
print(a[n]) |
s954838360 | p03544 | u479937725 | 1594180659 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9100 | 95 | N = int(input())
L0 = 2
L1 = 1
for n in range(N-1):
L = L0+L1
L0 = L1
L1 = L
print(L) |
s413125240 | p03544 | u068142202 | 1593793635 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9032 | 199 | n = int(input())
lucas_number = [0] * (n + 1)
lucas_number[0] = 2
lucas_number[1] = 1
for i in range(2, n + 1):
lucas_number[i] = lucas_number[i - 1] + lucas_number[i - 2]
print(lucas_number[i])
|
s067780272 | p03544 | u634079249 | 1593477280 | Python | Python (3.8.2) | py | Runtime Error | 36 | 10096 | 1145 | import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque
# import fractions
sys.setrecursionlimit(10000000)
ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il ... |
s118763330 | p03544 | u357751375 | 1593033822 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9088 | 159 | n = int(input())
#j = L0
j = 2
#k = L1
k = 1
if n == 0:
print(2)
if n == 1:
print(1)
for i in range(1,n):
l = j + k
j = k
k = l
print(l) |
s425264444 | p03544 | u357751375 | 1593033674 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9148 | 110 | n = int(input())
#j = L0
j = 2
#k = L1
k = 1
for i in range(1,n):
l = j + k
j = k
k = l
print(l) |
s399565312 | p03544 | u750651325 | 1592860047 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9408 | 208 | import functools
@fuctools.lru_cache(maxsize=None)
def luca(n):
if n==0:
return 2
elif n == 1:
return 1
else:
return luca(n-1)+luca(n-2)
N = int(input())
print(luca(N))
|
s759283690 | p03544 | u750651325 | 1592859973 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9436 | 199 | import functools
@lru_cache(maxsize=None)
def luca(n):
if n==0:
return 2
elif n == 1:
return 1
else:
return luca(n-1)+luca(n-2)
N = int(input())
print(luca(N))
|
s495079521 | p03544 | u366796457 | 1592587115 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9012 | 350 | N = int(input())
L0=2
L1=0
if N == 1
return L0
elif N == 2:
return L1
else:
for i in range(N-2):
L0, L1 = L1, L0+L1
return L1
print()
N = int(input())
L0=2
L1=0
if N == 1
return L0
elif N == 2:
return L1
else:
for i in range(N-2):
L0, L1 = L1, L0+L1
re... |
s801193802 | p03544 | u366796457 | 1592586917 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8792 | 171 | N = int(input())
L0=2
L1=0
if N == 1
return L0
elif N == 2:
return L1
else:
for i in range(N-2):
L0, L1 = L1, L0+L1
return L1
print() |
s615619048 | p03544 | u343490140 | 1592420389 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | n = int(input())
l0 = 2
l1 = 1
for i in range(2, n+1):
l = l0 + l1
l0 = l1
l1 = l
print(l) |
s029050908 | p03544 | u922487073 | 1591855314 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 132 | N = int(input())
L0 = 2
L1 = 1
if N == 1:
print(L1)
for i in range(1,N):
res = L0 + L1
L0 = L1
L1 = res
print(res) |
s042178710 | p03544 | u922487073 | 1591855220 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 107 | N = int(input())
L0 = 2
L1 = 1
for i in range(1,N):
res = L0 + L1
L0 = L1
L1 = res
print(res) |
s104926021 | p03544 | u551437236 | 1590222207 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 214 | n = int(input())
l0 = 2
l1 = 1
if n == 0:
print(l0)
elif n == 1:
print(l1)
elif n>= 2:
ll = [l0, l1] + [0 for _ in range(n-1)]
for i in range(2,n+1):
ll[i] = ll[i-1] + ll[i-2]
print(ll[n])
|
s071739821 | p03544 | u129898499 | 1590205541 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 245 | import sys
sys.setrecursionlimit(10000)
N = int(input())
l=[-1]*(n+1)
def lyuka(x):
if l[x] != -1:
return l[x]
if x == 0:
return 2
if x == 1:
return 1
lyu = lyuka(x-1) + lyuka(x-2)
l[x] = lyu
return lyu
print(lyuka(N)) |
s084122032 | p03544 | u156383602 | 1589924357 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 140 | n=int(input())
if n==1:
print(1)
else:
l1=2
l2=1
for i in range(n-1):
l3=l1+l2
l1=l2
l2=l3
print(l2) |
s684269307 | p03544 | u493130708 | 1589921530 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38640 | 136 | N = int(input)
def luca(N):
if N>=2:
return luca(N-2)+luca(N-1)
if N==1:
return 1
if N==0:
return 2
print(luca(N)) |
s858628611 | p03544 | u262244504 | 1589830690 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 132 | n=int(input())
a=2
b=1
if n==1:
s=1
n=2
for i in range(n-1):
nn = a+b
ans=nn
a=b
b=nn
if s==1:
ans = 1
print(ans) |
s363095699 | p03544 | u262244504 | 1589830379 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 91 | n=int(input())
a=2
b=1
for i in range(n-1):
nn = a+b
ans=nn
a=b
b=nn
print(ans) |
s215236947 | p03544 | u991134049 | 1589737838 | Python | PyPy3 (2.4.0) | py | Runtime Error | 169 | 38384 | 83 | L = [2, 1]
for i in range(84):
L.append(L[i]+L[i+1])
A = int(input())
print(L[A]) |
s727692590 | p03544 | u991134049 | 1589737803 | Python | PyPy3 (2.4.0) | py | Runtime Error | 180 | 38384 | 85 | L = [2, 1]
for i in range(84):
L.append(L[i]+L[i+1])
A = int(input())
print(L[A+1]) |
s769953963 | p03544 | u991134049 | 1589737777 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38512 | 85 | L = [2, 1]
for i in range(84):
L.append(L[i]+L[L+1])
A = int(input())
print(L[A+1]) |
s955475168 | p03544 | u992465933 | 1588743267 | Python | PyPy3 (2.4.0) | py | Runtime Error | 169 | 38256 | 174 | def main():
n = input()
array = [2,1]
for i in range(100):
array.append(array[i]+array[i+1])
print(array[n])
if __name__ == '__main__':
main()
|
s390789999 | p03544 | u363836311 | 1588536139 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 132 | n=int(input())
l=[0]*n
l[0]=2
l[1]=1
for i in range(n):
if i==0 or i==1:
continue
else:
l[i]=l[i-1]+l[i-2]
print(l[n-1]) |
s156105594 | p03544 | u363836311 | 1588536107 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 130 | n=int(input())
l=[0]*n
l[0]=2
l[1]=1
for i in range(n):
if i==0 or i==1:
continue
else:
l[i]=l[i-1]+l[i-2]
print(l[n]) |
s859857583 | p03544 | u306950978 | 1588452297 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 110 | p = [2,1]
n = int(input())
if n >= 3:
for i in range(2,n+1):
p.append(p[i-2]+p[i-1])
print(p[n]) |
s403053089 | p03544 | u618002097 | 1588390055 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38512 | 118 | N = int(input())
Li_2 = 2
Li_1 = 1
for i in range(N-1):
Li = Li_2 + Li_1
Li_2 = Li_1
Li_1 = Li
print(Li) |
s172380829 | p03544 | u067694718 | 1588352597 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 116 | l = [2, 1]
def l(x):
if len(l) > x:
return l[x]
else:
return l(x-1) + l(x-2)
print(l(int(input())))
|
s819601784 | p03544 | u067694718 | 1588352542 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 114 | l = [2, 1]
def l(x):
if len(l) > x:
return l[x]
else:
return l(x-1) + l(x-2)
print(l(int(input())) |
s923825646 | p03544 | u062881897 | 1588190046 | Python | PyPy3 (2.4.0) | py | Runtime Error | 176 | 38256 | 87 | n = input()
if n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
print('YES')
else:
print('NO') |
s684688181 | p03544 | u141410514 | 1588109095 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 135 | n = int(input())
L = [0 for _ in range(86)]
L[0]=2
L[1]=1
if n > 2:
for i in range(2,n+1):
L[i] = L[i-1]+L[i-2]
print(L[n]) |
s447995670 | p03544 | u813174766 | 1588023578 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 76 | t=[0,1]
for i in range(2,90):
t.append(t[i-1]+t[i-2])
print(t(int(input()) |
s790421274 | p03544 | u351892848 | 1587700820 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 165 | from typing import List
N = int(input())
L: List[int] = [None] * (N + 1)
L[0] = 2
L[1] = 1
for i in range(2, N + 1):
L[i] = L[i - 1] + L[i - 2]
print(L[N])
|
s185757610 | p03544 | u796408111 | 1587523832 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | N = int(input())
L0 = 2
L1 = 1
for i in range(N - 1):
L2 = L1 + L0
L0 = L1
L1 = L2
print(L2)
|
s168048795 | p03544 | u106181248 | 1587259636 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 100 | n = int(input())
x = 2
y = 1
for i in range(n-1):
ans = x + y
x = y
y = ans
print(ans) |
s927505225 | p03544 | u858670323 | 1587092150 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 99 | n = int(input())
L = [0]*(n+1)
L[1]=2
L[2]=1
for i in range(3,n+1);
L[i]=L[i-1]+L[i-2]
print(L[n]) |
s676535959 | p03544 | u023229441 | 1586977550 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 110 | n=int(input())
L=[0 for i in range(n)]
L[0]=2 ; L[1]=1
for i in range(2,n):
L[i]=L[i-1]+L[i-2]
print(L[n-1]) |
s493587116 | p03544 | u151625340 | 1586817426 | Python | PyPy3 (2.4.0) | py | Runtime Error | 177 | 38640 | 154 | N = int(input())
L = [0]*(N+2)
L[0] = 2
L[1] = 1
if N<=2:
print(L[i-1])
else:
for i in range(2,N+1):
L[i] = L[i-1]+L[i-2]
print(L[N])
|
s842743285 | p03544 | u151625340 | 1586816962 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38384 | 147 | N = int(input())
L = [0]*(N+1)
L[0] = 2
L[1] = 1
if N<=2:
print(L[i-1])
exit()
for i in range(2,N+1):
L[i] = L[i-1]+L[i-2]
print(L[N])
|
s505254791 | p03544 | u026402121 | 1586228483 | Python | Python (3.4.3) | py | Runtime Error | 150 | 12508 | 266 | import numpy as np
N = int(input())
L = np.zeros(86,np.int64)
L[0] = 2
L[1] = 1
def luca(n):
if n == 0:
return L[0]
elif n == 1:
return L[1]
if L[n] != 0:
return L[n]
L[n] =luca(n-1) + luca(n-2)
return L[n]
print(luca(N)) |
s639305429 | p03544 | u798675549 | 1586224472 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 916 | print([2,1,3,4,7,11,18,29,47,76,123,199,322,521,843,1364,2207,3571,5778,9349,15127,24476,39603,64079,103682,167761,271443,439204,710647,1149851,1860498,3010349,4870847,7881196,12752043,20633239,33385282,54018521,87403803,141422324,228826127,370248451,599074578,969323029,1568397607,2537720636,4106118243,6643838879,10749... |
s947212757 | p03544 | u159228113 | 1586223296 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | a = int(input())
def luc(n):
if n = 0:
return 2
elif n = 1:
return 1
else:
return luc(n-1) + luc(n-2)
print(luc(a)) |
s330590711 | p03544 | u499381410 | 1584903356 | Python | PyPy3 (2.4.0) | py | Runtime Error | 182 | 38384 | 2349 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecD = vector<ld>;
using VecS = vector<string>;
using Graph = vector<V... |
s491448590 | p03544 | u728120584 | 1584402213 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 98 | N = int(input())
L = [2, 1]
for i in range(2, N+1):
L.append(L[i - 1] + L[i - 2])
print(L[i])
|
s558911418 | p03544 | u411203878 | 1584311799 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38384 | 143 | n=int(input())
r1=2
r2=1
if n == 1:
print(r2)
else :
for i in range(n-1):
r3 = r1+r2
r1 = r2
r2 = r3
print(r3) |
s558747331 | p03544 | u556589653 | 1583931533 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 122 | N = int(input())
k = [2,1]
if N == 1:
print(1)
else:
for i in range(N-1):
S = k[i]+k[i+1]
k.append(S)
print(S) |
s943583321 | p03544 | u066855390 | 1583217099 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 86 | a = 2
b = 1
c = 0
for i in range(2, n + 1):
c = a + b
a = b
b = c
print(c) |
s464781022 | p03544 | u757030836 | 1583084588 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 116 | n = int(input())
L = []
L.append(2)
L.append(1)
for i in range(2,84):
L.append(L[i-2] + L[i-1])
print(L[n-1]) |
s452988898 | p03544 | u337820403 | 1582247831 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 74 | import sympy
print([sympy.lucas(i) for i in range(1, int(input())+1)][-1]) |
s021434151 | p03544 | u391667116 | 1582173702 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 93 | n = int(input())
f = 2
s = 1
for i in range(n-1):
l = f + s
f = s
s = l
print(l)
|
s356861254 | p03544 | u018679195 | 1581189922 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 211 | a = []
a.append(2)
a.append(1)
for i in range(2, 87):
a.append(a[i - 1] + a[i - 2])
n = input()
while (1):
if (n):
pass
else:
break
n = int(n)
print(a[n])
n = input()
|
s399305316 | p03544 | u189487046 | 1581112736 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 129 | n = int(input())
n0 = 2
n1 = 1
if n == 1:
print(1)
else:
for _ in range(1, n):
n0, n1 = n1, n0+n1
print(n2)
|
s533176773 | p03544 | u189487046 | 1581112430 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 99 | n = int(input())
n0 = 2
n1 = 1
for _ in range(1, n):
n2 = n0+n1
n0, n1 = n1, n2
print(n2)
|
s001793944 | p03544 | u995062424 | 1580591278 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 179 | n = int(input())
cnt = 0
def lucas(n, ans1, ans2):
for _ in range(n-1):
ans = ans1 + ans2
ans1 = ans2
ans2 = ans
return ans
print(lucas(n, 2, 1)) |
s415597424 | p03544 | u993310962 | 1580066193 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 141 | n=int(input())
l=[2,1]
if n>2:
for i in range(2,n+1):
li=l[i-1]+l[i-2]
l.append(li)
print(l[n])
else:
print(l[n]) |
s984934444 | p03544 | u201382544 | 1579694089 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 109 | n = int(input())
l = []
l.append(2)
l.append(1)
for i in range(2,86):
l.append(l[i-1] + l[i-2])
print(l[n]) |
s667993260 | p03544 | u445404615 | 1579114555 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 93 | n = int(input())
l = [2,1]
for i in range(2,n+1):
l.append(l[i-1] + l[i-2])
print(l[i]) |
s390236583 | p03544 | u230621983 | 1578545624 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 113 | n = int(input())
l_2 = 2
l_1 = 1
for _ in range(1,n):
l_now = l_1 + l_2
l_2 = l_1
l_1 = l_now
print(l_now) |
s870441319 | p03544 | u148551245 | 1577872551 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1424 | fn main() {
let n: i64 = read();
let ans = lucas(n);
println!("{}", ans);
}
fn lucas(n: i64) -> i64 {
if n == 0 { 2 }
else if n == 1 { 1 }
else {
lucas(n-1) + lucas(n-2)
}
}
// 以下関数
use std::io::*;
use std::str::FromStr;
pub fn read<T: FromStr>() -> T {
let stdin = stdin();
... |
s623108917 | p03544 | u148551245 | 1577872518 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1424 | fn main() {
let n: i32 = read();
let ans = lucas(n);
println!("{}", ans);
}
fn lucas(n: i32) -> i32 {
if n == 0 { 2 }
else if n == 1 { 1 }
else {
lucas(n-1) + lucas(n-2)
}
}
// 以下関数
use std::io::*;
use std::str::FromStr;
pub fn read<T: FromStr>() -> T {
let stdin = stdin();
... |
s763402967 | p03544 | u374146618 | 1577677832 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 108 | n = int(input())
a = 2
b = 1
for i in range(n-1):
c = a+b
temp = b
b = c
a = temp
print(c) |
s302712029 | p03544 | u374146618 | 1577669440 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 108 | n = int(input())
a = 2
b = 1
for i in range(n-1):
c = a+b
temp = b
b = c
a = temp
print(c) |
s177921744 | p03544 | u241159583 | 1577464868 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 100 | N = int(input())
L = [2, 1]
if N > 2:
for i in range(N - 1):
L.append(L[i]+L[i+1])
print(L[N]) |
s435179971 | p03544 | u684305751 | 1577158992 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 49 | a,b=2,1
for i in range(n):
a,b=b,a+b
print(a) |
s393739480 | p03544 | u609814378 | 1576708757 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 74 | import sympy as sym
N = 5
A = [sym.lucas(x) for x in range(N)]
print(A[N]) |
s408439876 | p03544 | u934788990 | 1576260591 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 221 | x = ['+++', '++-', '+-+', '+--', '-++', '-+-', '--+', '---']
a = input()
for i in range(8):
ans = a[0] + x[i][0] + a[1] + x[i][1] + a[2] + x[i][2] + a[3]
if eval(ans) == 7:
print(ans + '=7')
break
|
s751970815 | p03544 | u934788990 | 1576260089 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 105 | n = int(input())
i0 = 2
i1 = 1
for i in range(n-1):
ans = i0+i1
i0 = i1
i1 = ans
print(ans) |
s064524627 | p03544 | u226912938 | 1576251102 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 126 | n = int(input())
Num = [2,1]
for i in range(2,86):
new = Num[i-1] + Num[i-2]
Num.append(new)
ans = Num[n]
print(ans) |
s248415482 | p03544 | u918601425 | 1575789417 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 112 | N=int(input())
L=[0 for _ in range(N+1)]
L[0]=2
L[1]=1
for i in range(2,N+1):
L[i]=L[i-1]+L[i-2]
print(L[N+1]) |
s304483216 | p03544 | u074338678 | 1575250356 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3316 | 94 | N = int(input())
l = [1, 2]
for i in range(N-1):
l = l.append(l[i]+l[i+1])
print(l[-1]) |
s358009323 | p03544 | u923659712 | 1574456137 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 97 | n=int(input())
l=[0]*n+1
l[0]=2
l[1]=1
for i in range(2,n+2):
l[i]=l[i-1]+l[i-2]
print(l[n+1]) |
s161119697 | p03544 | u278670845 | 1574360806 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | n = int(input())
a= [0]*86
a[0]=1
a[1]=2
for i in range(2,87):
a[i]=a[i-1]+a[i-2]
print(a[n-1]) |
s337646371 | p03544 | u987164499 | 1574351071 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 158 | from sys import stdin
n = int(stdin.readline().rstrip())
li = [0]*86
li[0] = 2
li[1] = 1
for i in range(2,86):
li[i] = li[i-1] + li[i-2]
print(li[n]) |
s843652405 | p03544 | u209619667 | 1574289204 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 187 | l_0 = 2
l_1 = 1
A = int(input())
if A == 0:
print(l_0)
elif A == 1:
print(l_1)
else:
for i in range(1,A+1):
if i%2 != 0
l_1 = l_0 + L_1
else:
l_0 = l_0 + L_1 |
s849222100 | p03544 | u556589653 | 1574192562 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 99 | N = int(input())
L_2 = 2
L_1 = 1
for i in range(N-1):
K = L_1+L_2
L_2 = L_1
L_1 = K
print(K)
|
s294534335 | p03544 | u556589653 | 1574192389 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | N = int(input())
L_2 = 2
L_1 = 1
p = 0
for i in range(N-1):
K = L_1+L_2
L_2 = L_1
L_1 = K
print(K) |
s039997783 | p03544 | u556589653 | 1574192327 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | N = int(input())
L_2 = 2
L_1 = 1
p = 0
for i in range(2,N+1):
K = L_1+L_2
L_2 = L_1
L_1 = K
print(K) |
s171544173 | p03544 | u276115223 | 1573750318 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 185 | # ABC 079: B – Lucas Number
n = int(input())
l0 = 2
l1 = 1
if n == 1:
print(l1)
else:
for i in range(2, n + 1):
l = l0 + l1
l0 = l1
l1 = l
print(l) |
s191589568 | p03544 | u276115223 | 1573750226 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 138 | # ABC 079: B – Lucas Number
n = int(input())
l0 = 2
l1 = 1
for i in range(2, n + 1):
l = l0 + l1
l0 = l1
l1 = l
print(l) |
s998563359 | p03544 | u503228842 | 1573344872 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 124 | N = int(input())
memo = [0]*N
memo[0] = 2
memo[1] = 1
for n in range(2,N):
memo[n] = memo[n-1]+memo[n-2]
print(memo[-1]) |
s644428061 | p03544 | u503228842 | 1573344847 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 123 | N = int(input())
memo = [0]*N
memo[0] = 2
memo[1] = 1
for n in range(2,N):
memo[n] = memo[n-1]+memo[n-2]
print(memo[N]) |
s565552402 | p03544 | u175590965 | 1573184879 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 89 | n = int(input())
l = [2,1]
for i in range(2,n+1):
l.append(l[i-1]+l[i-2])
print(l[i]) |
s111350559 | p03544 | u185325486 | 1573050217 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 100 | N = int(input())
L0 = 2
L1 = 1
for _ in range(N-1):
L = L1 + L0
L0 = L1
L1 = L
print(L) |
s942957051 | p03544 | u768559443 | 1572547061 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38256 | 72 | a,b=2,1
for i in range(int(input()):
a,b=b,(a+b)
print(a) |
s109516518 | p03544 | u348868667 | 1572400612 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 107 | N = int(input())
L = [2,1]
if N > 3:
for i in range(2,N+1):
L.append(L[i-1]+L[i-2])
print(L[N]) |
s264098881 | p03544 | u724844363 | 1572392170 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 217 | for i in range(N):
if i == 0:
memo.append(2)
elif i == 1:
memo.append(1)
else:
memo.append(memo[i-1] + memo[i-2])
if N == 1:
print(1)
else:
print(memo[N - 1] + memo[N - 2]) |
s699268626 | p03544 | u724844363 | 1572392061 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 280 | N = int(input())
memo = []
for i in range(N):
if i == 0:
memo.append(2)
elif i == 1:
memo.append(1)
else:
memo.append(memo[i-1] + memo[i-2])
if N == 0:
print(memo[0])
elif N == 1:
print(memo[1])
else:
print(memo[N-1] + memo[N - 2]) |
s425754704 | p03544 | u691896522 | 1571942548 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 165 | n = int(input())
def Lucas(n):
if n == 0:
return 2
elif n == 1:
return 1
else
return Lucas(n - 1) + Lucas(n - 2)
print(Lucas(n))
|
s816388091 | p03544 | u672898046 | 1571712043 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 119 | n = int(input())
l_i_1 = 2
l_i_2 = 1
while n>=2:
l_i = l_i_1 + l_i_2
n -= 1
l_i_1= l_i_2
l_i_2 = l_i
print(l_i) |
s075359282 | p03544 | u628965061 | 1571367169 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 70 | n=int(input())
a,b=2,1
for i in range(2,n+1):
c=a+b
a,b=b,c
print(c) |
s158099310 | p03544 | u247465867 | 1570914833 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | #2019/10/12
N = int(open(0).read())
L0 = 2
L1 = 1
for i in range(N-1):
L2 = L1 + L0
L1, L0 = L2, L1
#print(i, L2)
print(L2) |
s009882252 | p03544 | u644907318 | 1570824047 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 194 | memo = {}
def L(n):
if n==0:
return 2
elif n==1:
return 1
elif n in memo:
return memo[n]
memo[n] = L[n-1]+L[n-2]
return memo[n]
print(L(int(input()))) |
s903393247 | p03544 | u644907318 | 1570823946 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 200 | memo = {}
def L(n):
if n==0:
return 2
elif n==1:
return 1
elif n in memo:
return memo[n]
memo[n] = memo[n-1]+memo[n-2]
return memo[n]
print(L(int(input()))) |
s562143522 | p03544 | u336624604 | 1570773593 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 150 | n = int(input())
l=[0]*100
l[0]=2
l[1]=1
def ryuka(x):
r = 0
for i in range(2,x+1):
l[i]=l[i-1]+l[i-2]
return l[i]
print(ryuka(n)) |
s405620206 | p03544 | u396495667 | 1569593578 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | n = int(input())
l = [2,1]
for i in range(2,100):
a = l[i-2]+l[i-1]
l.append(a)
print(l[int(input())]) |
s731017407 | p03544 | u597047658 | 1569465093 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 156 | N = int(input())
L_forward = 2
L_backward = 1
for i in range(2, N+1):
L = L_forward + L_backward
L_forward = L_backward
L_backward = L
print(L)
|
s159260750 | p03544 | u325956328 | 1569457194 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 140 | n = int(input())
a = 2
b = 1
if n < 2:
print(n)
else:
for i in range(n - 1):
c = a + b
a = b
b = c
print(c)
|
s163610831 | p03544 | u223904637 | 1568332045 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 95 | n=int(input())
l=[0]*n
l[0]=2
l[1]=1
for i in range(n-2):
l[i+2]=l[i+1]+l[i]
print(l[-1]) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.