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
s511323452
p02553
u777499281
1600024420
Python
Python (3.8.2)
py
Runtime Error
28
9096
157
if b > 0 and d > 0: print(max(b*d, a*c)) elif b > 0 and d < 0: print(a*d) elif b < 0 and d > 0: print(b*c) elif b <= 0 and d <= 0: print(a*c)
s405160358
p02553
u697690147
1600024400
Python
Python (3.8.2)
py
Runtime Error
26
9084
227
f = open("input.txt", "r") a, b, c, d = list(map(int, f.readline().split())) if b <= 0 and d <= 0: print(a*c) elif b < 0 and d >= 0: print(max(c, 1)*b) elif b >= 0 and d < 0: print(max(a, 1)*d) else: print(b*d)
s051701875
p02553
u799068099
1600024390
Python
Python (3.8.2)
py
Runtime Error
28
9196
135
a=int(input()) b=int(input()) c=int(input()) d=int(input()) e=[] e.append(a*c) e.append(a*d) e.append(b*c) e.append(b*d) print(max(e))
s694620718
p02553
u835090251
1600024380
Python
Python (3.8.2)
py
Runtime Error
29
9108
122
a,b,c,d=map(int(),input().split()) maxa=a*c e=a*d f=b*c g=b*d h=max(maxa,e) j=max(f,g) if h>j: print(h) else: print(j)
s348619675
p02553
u476802209
1600024328
Python
Python (3.8.2)
py
Runtime Error
28
9004
112
a,b,c,d=map(int,(input().split()) x,y=0,0 if a>b: x=a else: x=b if c>d: y=c else: y=d print(x*y)
s992999812
p02553
u245383302
1600024325
Python
Python (3.8.2)
py
Runtime Error
2223
535156
143
a,b,c,d=map(int,input().split()) List=[] for i in range(a,b+1): for j in range(c,d+1): if i>=0 and j>=0: List.append(i*j) max(List)
s785939602
p02553
u391589398
1600024320
Python
Python (3.8.2)
py
Runtime Error
28
9180
255
a, b, c, d = list(map(int, input().split())) # minus minus if b <= 0 and d <= 0: ans = a*c # minus plus if b <= 0 and c >= 0: ans = b*c # plus minus elif 0 <= a and d <= 0: ans = a*d # plus plus if a >= 0 and c >= 0: ans = b*d print(ans)
s953226244
p02553
u314042989
1600024315
Python
Python (3.8.2)
py
Runtime Error
31
9160
120
a, b, c, d = map(int, input().split()) for i in range(a, b + 1): for j in range(c, d + 1): print(max(i * j))
s522789236
p02553
u438720156
1600024302
Python
Python (3.8.2)
py
Runtime Error
26
9092
76
a,b,c,d=map(int,input().spit()) p=a*c q=a*d r=b*c s=b*d print(max(p,q,r,s))
s431099424
p02553
u263173473
1600024295
Python
Python (3.8.2)
py
Runtime Error
34
9120
174
a,b,c,d=int(input().split()) a=int(a) b=int(b) c=int(c) d=int(d) list1=[] list1.append(a*c) list1.append(a*d) list1.append(b*c) list1.append(b*c) list1.sort() print(list1[3])
s119141957
p02553
u203482013
1600024266
Python
Python (3.8.2)
py
Runtime Error
28
9108
59
a,b,c,d=input().split(' ') x=max(a,b) y=max(c,d) print(x*y)
s127433584
p02553
u752395175
1600024255
Python
PyPy3 (7.3.0)
py
Runtime Error
88
68640
166
def resolve(): a, b, c, d = map(int, input().split() w = a*c x = a*d y = b*c z = b*d ans = max(w, x, y, z) print(ans) resolve()
s208100389
p02553
u884244819
1600024250
Python
PyPy3 (7.3.0)
py
Runtime Error
2222
796560
241
def main(): l = list(map(int, input().split())) x = [i for i in range(l[0],l[1])] y = [i for i in range(l[2],l[3])] all_pair = [x*y for i in x for j in y] print(sorted(all_pair)[-1]) if __name__ == '__main__': main()
s857156379
p02553
u258406742
1600024224
Python
Python (3.8.2)
py
Runtime Error
26
9156
74
a,b,c,d = map(int, input().split()) l = [a*c, a*d, b*c, b*d] print(max[l])
s078968030
p02553
u582435914
1600024212
Python
Python (3.8.2)
py
Runtime Error
31
9008
62
a,b,c,d=map(int,input().split()) print (max(a*c,a*d,b*c,b*d)
s114596048
p02553
u738439089
1600024194
Python
Python (3.8.2)
py
Runtime Error
27
9160
93
a,b,c,d=list(map(int, input().split())) ac=a*c ad=a*d bc=b*c cd=b*d print(max([ac,ad,bc,bd]))
s662301570
p02553
u466916194
1600024190
Python
Python (3.8.2)
py
Runtime Error
27
9168
156
a = int(input()) b = int(input()) c = int(input()) d = int(input()) sum = [] sum.append(a*c) sum.append(a*d) sum.append(b*c) sum.append(b*d) print(max(sum))
s686135873
p02553
u087118202
1600024151
Python
PyPy3 (7.3.0)
py
Runtime Error
131
68484
136
a,b,c,d=map(int,input().split()) ans=-999999999999999999 for i in range(a,b+1): for j in range(c,d+1): ans=max(ans,i*j) print(ans
s802005307
p02553
u164776089
1600024144
Python
Python (3.8.2)
py
Runtime Error
28
9020
27
-1000000000 0 -1000000000 0
s543473344
p02553
u989222495
1600024116
Python
Python (3.8.2)
py
Runtime Error
26
8996
527
#include<bits/stdc++.h> #include<vector> #include<string> #include<stack> #include<iostream> #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define ll long long #define MOD 1000000007 #define vec(a) vector<int>a using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("output.txt...
s443593901
p02553
u879866069
1600024111
Python
Python (3.8.2)
py
Runtime Error
29
9160
79
a, b, c, d = [int(i) for i in input()] print(max([a * d, a * c, b * c, b * d]))
s105659091
p02553
u905029819
1600024091
Python
Python (3.8.2)
py
Runtime Error
26
9000
122
X = list(map(int, input().split())) print(max{X[0]*X[1], X[1]*X[2], X[2]*X[3], X[3]*X[0], X[0]*X[2], X[1]*X[3]})
s828114030
p02553
u005517181
1600024079
Python
Python (3.8.2)
py
Runtime Error
30
8960
225
#include<iostream> using namespace std; int main() { long long a,b,c,d,s,ss; cin>>a>>b>>c>>d; if ((a<=0 && 0<=b) || (c<=0 && 0<=d))k=1; s=max(a*c,a*d); ss=max(b*c,b*d); s=max(s,ss); if (k==1)s=max(0,s); cout<<s; }
s465775648
p02553
u263173473
1600024037
Python
Python (3.8.2)
py
Runtime Error
25
9160
130
a,b,c,d=int(input()) list1=[] list1.append(a*c) list1.append(a*d) list1.append(b*c) list1.append(b*c) list1.sort() print(list1[3])
s392047012
p02553
u282376189
1600024031
Python
Python (3.8.2)
py
Runtime Error
29
9016
61
a,b,c,d = map(int,input().split()) print(max(a*c,a*d,b*c,b*d)
s126014702
p02553
u444766154
1600024017
Python
Python (3.8.2)
py
Runtime Error
30
9092
82
a1 = a * c a2 = a * d a3 = b * c a4 = b * d list = [a1,a2,a3,a4] print(max(list))
s545212968
p02553
u244836567
1600024014
Python
Python (3.8.2)
py
Runtime Error
27
9016
176
a,b,c,d=input().split() a=int(a) b=int(b) c=int(c) d=int(d) if a>0: if b*d>a*c print(b*d) else: print(a*c) else: if a*c>b*d: print(a*c) else: print(b*d)
s408455891
p02553
u066120361
1600024000
Python
Python (3.8.2)
py
Runtime Error
2314
3077408
163
a, b, c, d = map(int, input().split()) x = list(range(a,b+1)) y = list(range(c, d+1)) ans = [] for i in x: for j in y: ans.append(i*j) print(max(ans))
s328586519
p02553
u771680013
1600023946
Python
PyPy3 (7.3.0)
py
Runtime Error
87
68516
49
_,b,_,d = map(int,input().split()) print(int(b*d)
s218181268
p02553
u488884575
1600023933
Python
Python (3.8.2)
py
Runtime Error
22
9144
130
a,b,c,d=map(int,input().split()) ans = -10**9 for i in range([a,b]): for j in range([c,d]): ans = max(ans, i*j) print(ans)
s626510086
p02553
u493520238
1600023933
Python
PyPy3 (7.3.0)
py
Runtime Error
84
68616
288
a,b,c,d = map(int, input().split()) if b>=0 and d>= 0: ans = b*d elif b < 0 and d >= 0: if c <= 0: ans = max(ans,0) else: ans = b*c elif b >= 0 and d < 0: if a <= 0: ans = 0 else: ans = a*d else: ans = a*c if a <= 0 and c <= 0: ans = max(ans,a*c) print(ans)
s977991055
p02553
u660237354
1600023909
Python
Python (3.8.2)
py
Runtime Error
30
9004
1036
#include <bits/stdc++.h> using namespace std; #define ll long long int #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define scan(a,n) for(long long int index=0;index<n;index++) cin>>a[index]; #define print(a,n) for(long long int index=0;index<n;index++) cout<<a[index]<<" ";cout<<endl; ...
s871736785
p02553
u757504644
1600023893
Python
Python (3.8.2)
py
Runtime Error
28
9024
68
a = [int(x) for x in input().split()] print(max(a[0]*a[2],a[1]*a[3])
s020714050
p02553
u721901576
1600023892
Python
Python (3.8.2)
py
Runtime Error
33
9176
127
a,b,c,d = map(int,input().split()) if a < b: x = b if a < b: x = a if c < d: y = d if c > d: y = c print(x*y)
s849649958
p02553
u282376189
1600023885
Python
Python (3.8.2)
py
Runtime Error
29
9144
55
a,b,c,d = map(int,input()) print(max(a*c,a*d,b*c,b*d))
s433558265
p02553
u955539037
1600023857
Python
Python (3.8.2)
py
Runtime Error
24
9000
3074
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<bool> vb; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<pii> vpii; typedef vector<pll> vpl; typedef vector<vi> vvi; typedef vector<vll> vvll; void __print(int x) {...
s547221295
p02553
u075950453
1600023844
Python
Python (3.8.2)
py
Runtime Error
32
9016
148
a,b,c,d = int(input().split()) ans_list= [] ans_list.append(a*c) ans_list.append(a*d) ans_list.append(b*c) ans_list.append(b*d) print max(ans_list)
s337927005
p02553
u945761460
1600023836
Python
Python (3.8.2)
py
Runtime Error
27
9176
70
a,b,c,d=map(int,input().split()) print(mac(max(a*c,a*d),max(b*c,b*d)))
s637787414
p02553
u440608859
1600023825
Python
Python (3.8.2)
py
Runtime Error
25
9156
76
a,b,c,d=map(int,input().split()) ans=max[(b*d),(a*c),(a*d),(b*c)] print(ans)
s543392218
p02553
u961223096
1600023802
Python
PyPy3 (7.3.0)
py
Runtime Error
89
68712
137
import sys def dump(x): print(x, file=sys.stderr) a,b,c,d = [int(i) for i in input()] ans = max(a*c,a*d,b*c,b*d,) print(ans)
s787334480
p02553
u427571081
1600023799
Python
Python (3.8.2)
py
Runtime Error
23
9016
62
a,b,c,d=map(int,input().split()) print(max([a*c,a*d,b*c,c*d])
s411535422
p02553
u060793972
1600023792
Python
Python (3.8.2)
py
Runtime Error
29
9012
27
-1000000000 0 -1000000000 0
s972833274
p02553
u574610297
1600023790
Python
Python (3.8.2)
py
Runtime Error
26
9020
83
a, b, c, d =[int(s) for s in input().split()] print(max(a * c, a * d, b * c, b * d)
s375445570
p02553
u456225659
1600023787
Python
Python (3.8.2)
py
Runtime Error
26
9160
107
a,b,c,d=map(int,input().split()) g=[] g.append(a*c) g.append(a.d) g.append(b.c) g.append(b.d) print(max(g))
s064450444
p02553
u693025087
1600023778
Python
PyPy3 (7.3.0)
py
Runtime Error
175
68712
156
lst =map(int, input().split()) max_value = 0 for i in range(len(lst)): for j in range(i): max_value = max(max_value, lst[i]*lst[j]) print(max_value)
s852156071
p02553
u090649502
1600023767
Python
Python (3.8.2)
py
Runtime Error
29
8952
55
a,b,c,d=map(int, input()) print(max(a*c, a*d, b*c, b*d)
s813126899
p02553
u696684809
1600023764
Python
Python (3.8.2)
py
Runtime Error
30
9204
162
a,b,c,d = map(int,input().split()) answer = 0 ac =a*c ad = a*d bc = b*C bd = b*d answer = max(ac,ad) answer = max(answer,bc) answer = max(answer,bd) print(answer)
s286416815
p02553
u957957759
1600023741
Python
Python (3.8.2)
py
Runtime Error
29
9160
110
a,b,c,d=int(input()) l=[] for i in range(a,b+1): for j in range(c,d+1): l.append(i*j) print(max(l))
s328044119
p02553
u508972438
1600023733
Python
PyPy2 (7.3.0)
py
Runtime Error
167
65184
936
# Template 1.0 import sys, re from collections import deque, defaultdict, Counter, OrderedDict from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log,floor from heapq import heappush, heappop, heapify, nlargest, nsmallest def STR(): return list(input()) def INT(): return int(input()) def MAP(): retur...
s013300845
p02553
u574610297
1600023730
Python
Python (3.8.2)
py
Runtime Error
26
9084
84
a, b, c, d = [int(s) for s in input().split()] return max(a * c, a * d, b *c, b * d)
s097661800
p02553
u086503932
1600023718
Python
Python (3.8.2)
py
Runtime Error
32
9032
75
a, b, c, d = map(int, input().split()) print(max([a*c, a*d, b*c, b*d]))
s310698135
p02554
u779455925
1600729383
Python
PyPy3 (7.3.0)
py
Runtime Error
129
77396
631
from heapq import * import sys from collections import * from itertools import * from decimal import * import copy from bisect import * import math import numpy as np import random sys.setrecursionlimit(4100000) def gcd(a,b): if(a%b==0):return(b) return (gcd(b,a%b)) input=lambda :sys.stdin.readline().rstrip() ...
s650106250
p02554
u779455925
1600729362
Python
PyPy3 (7.3.0)
py
Runtime Error
106
77508
631
from heapq import * import sys from collections import * from itertools import * from decimal import * import copy from bisect import * import math import numpy as np import random sys.setrecursionlimit(4100000) def gcd(a,b): if(a%b==0):return(b) return (gcd(b,a%b)) input=lambda :sys.stdin.readline().rstrip() ...
s231918471
p02554
u955125992
1600710923
Python
Python (3.8.2)
py
Runtime Error
25
9020
150
n = int(input()) MOD = 10**9 + 7 ans = pow(10, n, MOD)-pow(9, n, MOD) - pow(9, n, MOD) + pow(8, n, MOD) #負の処理 ans (ans+MOD)%MOD print(ans)
s501858999
p02554
u583276018
1600685954
Python
Python (3.8.2)
py
Runtime Error
387
11176
49
n=int(input()) print((10**n-9**n*2+8**n)%(1e9+7))
s889555499
p02554
u754511616
1600594945
Python
Python (3.8.2)
py
Runtime Error
23
8984
53
N=int(input()) print((10**N-9**N-9**N+8**N)/(10**7+7)
s118601610
p02554
u918601425
1600519460
Python
Python (3.8.2)
py
Runtime Error
63
16888
416
N=int(input()) MOD=10**9+7 MAX=N+1 powerls=[0 for i in range(MAX)] powerls[0]=1 powerls[1]=base def powermod(ind): if powerls[ind]!=0: return powerls[ind] elif ind%2==0: p=(powermod(base,ind//2)**2)%MOD powerls[ind]=p return p else: p=((powermod(base,ind//2)**2)*base)%MOD ...
s146117387
p02554
u622838398
1600498184
Python
Python (3.8.2)
py
Runtime Error
24
8964
37
return N*(N-1)*9**(N-2) % (10**9 + 7)
s849453035
p02554
u095424182
1600481575
Python
Python (3.8.2)
py
Runtime Error
25
9132
148
from itertools import combinations if __name__=="__main__": N=int(input()) if N<2: print(0) else: print(combinations(N,2)%(10**9+7))
s849970037
p02554
u095424182
1600481516
Python
Python (3.8.2)
py
Runtime Error
26
9168
140
from itertools import combinations if __name__=="__main__": N=int(input()) if N<2: print(0) else: combinations(N,2)%(10**9+7)
s489184712
p02554
u876106257
1600475111
Python
PyPy3 (7.3.0)
py
Runtime Error
99
74372
111
n = int(input()) p = 10**9+7 print((pow(10, n, p) - 2*pow(9, n, p) + pow(8, n, p)) % p)
s552876503
p02554
u876106257
1600474996
Python
PyPy3 (7.3.0)
py
Runtime Error
94
74700
98
n = int(input()) p = 10**9+7 print((pow(10, n, p) - 2*pow(9, n, p) + pow(8, n, p) % p)
s025909518
p02554
u876106257
1600474720
Python
PyPy3 (7.3.0)
py
Runtime Error
96
74388
86
n = int(input()) p = 10**9+7 print((pow(10, n, p) - 2*pow(9, n, p) + pow(8, n, p)) % p
s864237364
p02554
u241190800
1600443360
Python
Python (3.8.2)
py
Runtime Error
386
10944
57
n = int(input()) print((10**n -2*9**n + 8**n)/1000000007)
s794932383
p02554
u241190800
1600443167
Python
Python (3.8.2)
py
Runtime Error
201
10392
93
n = int(input()) if n >=2: ans = (10**(n-2)*n*(n-1))/(10**9 + 7) else: ans = 0 print(ans)
s278835103
p02554
u231905444
1600427389
Python
Python (3.8.2)
py
Runtime Error
22
8952
236
n = int(input()) ans = 1 ans1 = 1 ans2 = 1 mod = 1000000007 for i in range(n): ans = (ans*10)%mod ans2 = (ans2*8)%mod ans1 = (ans1*9)%mod ans = (ans - ans1 + mod)%mod ans = (ans - ans1 + mod)%mod ans = (ans + ans2)%mod print(ans)
s741447698
p02554
u231905444
1600427182
Python
Python (3.8.2)
py
Runtime Error
26
8904
153
n = int(input()) ans = 1 ans2 = 1 mod = 1000000007 for i in range(n): ans = (ans*10)%mod ans2 = (ans2*8)%mod ans = (ans - ans2 + mod)%mod print(ans)
s996953951
p02554
u404842368
1600367857
Python
Python (3.8.2)
py
Runtime Error
26
8948
94
n = int(input()) ans = pow(10,n,mod) ans -= pow(9,n,mod)*2 ans += pow(8,n,mod) print(ans%mod)
s149527975
p02554
u627886394
1600293321
Python
Python (3.8.2)
py
Runtime Error
25
8904
48
n=input() print((10**n-(2*9**n-8**n))%(10**9+7))
s714752433
p02554
u536230475
1600254632
Python
PyPy3 (7.3.0)
py
Runtime Error
89
68756
170
n = r() tens=1 nines=1 eights=1 mod = 10**9+7 for i in range(n): tens=(tens*10)%mod nines=(nines*9)%mod eights=(eights*8)%mod print((tens-2*nines+eights)%mod)
s694832032
p02554
u964904181
1600248583
Python
Python (3.8.2)
py
Runtime Error
23
9472
361
from functools import reduce N = int(input()) mod = 10**9 + 7 def powmod(val, n, mod): # vals = [val]*n # ret = reduce(lambda x, y: x * y % mod, vals) # return ret for i in range(n): ret = ret * val % mod return ret all = powmod(10, N, mod) b = powmod(9, N, mod) c = powmod(8, N, mod)...
s615754527
p02554
u374802266
1600245924
Python
Python (3.8.2)
py
Runtime Error
25
9064
71
n,m=int(input()),10**9+7 print((pow(10,p,m)-2*pow(9,p,m)+pow(8,p,m))%m)
s547692390
p02554
u672156095
1600211760
Python
Python (3.8.2)
py
Runtime Error
2206
11088
53
n = int(input()) print(10**n - 9**n - 9**n ) + 8**n
s115300134
p02554
u658600714
1600208609
Python
PyPy3 (7.3.0)
py
Runtime Error
90
74676
44
n = int(input()) print(10**n=9**n-8**n-9**n)
s029258016
p02554
u810348111
1600193218
Python
Python (3.8.2)
py
Runtime Error
27
8944
56
n=int(input()) print((10**n-(9**n+9**n-8**n)%(10**9+7))
s768630020
p02554
u325149030
1600178751
Python
Python (3.8.2)
py
Runtime Error
24
9160
130
mod = 10**9+7 N = int(input()) ans = (pow(a,N,mod) - 2*pow(b, N, mod) + pow(c, N, mod))%mod if ans < 0: ans += mod print(ans)
s257335876
p02554
u734197299
1600178716
Python
Python (3.8.2)
py
Runtime Error
2206
14748
153
import math N=int(input()) ku=math.factorial(N) if N==1: kekka=0 elif N==2: kekka=ku else: kekka=(ku/2*10^(N-2))%1000000007 print(kekka)
s947101893
p02554
u734197299
1600178513
Python
Python (3.8.2)
py
Runtime Error
25
9068
153
import math N=int(input()) ku=math.factorial(5) if N==1: kekka=0 elif N==2: kekka=ku else: kekka=(ku/2*10^(N-2))%1000000007 print(kekka)
s406131174
p02554
u734197299
1600178459
Python
Python (3.8.2)
py
Runtime Error
23
9180
172
import math N=int(input()) print(N) ku=math.factorial(5) print(ku) if N==1: kekka=0 elif N==2: kekka=ku else: kekka=(ku/2*10^(N-2))%1000000007 print(kekka)
s525850080
p02554
u347502437
1600163725
Python
Python (3.8.2)
py
Runtime Error
29
9012
95
def main(): N = input() print((10 ** N - 9 ** N - 9 ** N + 8 ** N)%(10**9 + 7)) main()
s288376283
p02554
u714852797
1600121460
Python
Python (3.8.2)
py
Runtime Error
29
9112
105
N = int(input()) mod = 10 ** 9 + 7 print((pow(10, n, mod) - 2 * pow(9, n, mod) + pow(8, n, mod)) % mod)
s536315354
p02554
u366558796
1600120835
Python
Python (3.8.2)
py
Runtime Error
26
9120
115
n = int(input()) n = int(input()) mod = int(1e9)+7 print((pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, mod))%mod)
s998478694
p02554
u714852797
1600119584
Python
Python (3.8.2)
py
Runtime Error
200
10348
69
print(10 ** int(input()) - 2 * 9 ** int(input()) + 8 ** int(input()))
s793992007
p02554
u674588203
1600116408
Python
Python (3.8.2)
py
Runtime Error
26
8928
140
# AtCoder Beginner Contest 178 # C - Ubiquity import math N=int(input()) mod=10**9+7 print((10**N)%mod-(9**N)%mod)-(9**N)%mod+(8**N)%mod)
s282524946
p02554
u445624660
1600106785
Python
PyPy3 (7.3.0)
py
Runtime Error
1783
392684
1236
import sys sys.setrecursionlimit(10**9) n = int(input()) mod = 10**9 + 7 # 再帰だとなんか通らん # dp = {} # def rec(i, zero, nine): # if (i, zero, nine) in dp: # return dp[(i, zero, nine)] # if i == n: # return 1 if (zero and nine) else 0 # ret = 0 # for j in range(10): # if j == 0: # ...
s558723199
p02554
u445624660
1600104534
Python
PyPy3 (7.3.0)
py
Runtime Error
2231
736568
577
import sys sys.setrecursionlimit(10**9) n = int(input()) mod = 10**9 + 7 dp = {} def rec(i, zero, nine): if (i, zero, nine) in dp: return dp[(i, zero, nine)] if i == n: return 1 if (zero and nine) else 0 ret = 0 for j in range(10): if j == 0: ret += rec(i + 1, Tru...
s571042668
p02554
u064505481
1600102797
Python
PyPy3 (7.3.0)
py
Runtime Error
90
68696
1730
// #pragma GCC optimize ("O3") // #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; const int INF = 1 << 29; const int NINF = -1*INF; const long long LLINF = 1ll << 60; const long long LLNINF = -1*LLINF; template <class Ch, class Tr, class Container> basic_ostream <Ch, Tr> & operator << (basic...
s924450706
p02554
u395313349
1600101992
Python
Python (3.8.2)
py
Runtime Error
29
9100
168
def main(): MOD = int(1e9 + 7) n = int(input()) print((pow(10,n,MOD) - 2*pow(9 , n , MOD)%MOD + pow(8 , n , MOD) + MOD)%MOD) if __namme__ == "__main__": main()
s387982166
p02554
u679750439
1600099109
Python
Python (3.8.2)
py
Runtime Error
25
9004
72
import math n=int(input) m=(10**n)-(2*(9**n))+(8**n) print(m%1000000007)
s537252512
p02554
u066494348
1600098289
Python
Python (3.8.2)
py
Runtime Error
25
8848
43
n=input() print(mod(pow(2,n)-2,1000000007))
s675018312
p02554
u064505481
1600096099
Python
PyPy3 (7.3.0)
py
Runtime Error
2231
802592
736
from sys import stdin, stdout, setrecursionlimit from collections import deque, defaultdict, Counter from heapq import heappush, heappop from functools import lru_cache import math setrecursionlimit(10**7) rl = lambda: stdin.readline() rll = lambda: stdin.readline().split() rli = lambda: map(int, stdin.readline().spli...
s279711171
p02554
u064505481
1600096053
Python
PyPy3 (7.3.0)
py
Runtime Error
853
348948
736
from sys import stdin, stdout, setrecursionlimit from collections import deque, defaultdict, Counter from heapq import heappush, heappop from functools import lru_cache import math setrecursionlimit(10**5) rl = lambda: stdin.readline() rll = lambda: stdin.readline().split() rli = lambda: map(int, stdin.readline().spli...
s051221851
p02554
u976887940
1600093819
Python
Python (3.8.2)
py
Runtime Error
198
10296
95
N=int(input()) if N==1: ans=0 else: x=N*(N-1)/2*10**(N-2) ans=x%(7+10**9) print(int(ans))
s227265750
p02554
u976887940
1600093732
Python
Python (3.8.2)
py
Runtime Error
199
10444
90
N=int(input()) if N==1: ans=0 else: x=N*(N-1)/2*10**(N-2) ans=x/(7+10**9) print(ans)
s812887441
p02554
u706659319
1600093617
Python
PyPy3 (7.3.0)
py
Runtime Error
131
74380
202
tmp = 10 ** 9 + 7 def div(n,T): _ = 1 for t in range(T): _ *= n _ %= tmp return _ N = int(input()) a = div(10,N) b = div(9,N) c = div(8,N) print((a + c - 2 * b) % tmp
s305040778
p02554
u636582303
1600093176
Python
Python (3.8.2)
py
Runtime Error
25
9080
172
mod = 10 ** 9 + 7 N = int(input()) result = 0 ten = pow(10, N, mod) nine = pow(9, N, mod) eight = pow(8, N, mod) result = (ten - 2 * nine + eight) % mode print(result)
s711712302
p02554
u592826944
1600093035
Python
PyPy3 (7.3.0)
py
Runtime Error
94
74496
77
n = int(input()) m=int(1e9+7) print(((pow(10,n,m)+pow(8,n,m)-2*pow(9,n,m))%m)
s033650015
p02554
u543000780
1600090884
Python
Python (3.8.2)
py
Runtime Error
27
8904
628
mod = 10**9+7 def fact(n): ans = 1 for num in range(n): ans = (ans*(num+1))%mod return ans def power(a,m,mod): if m == 0: return 1 elif m%2 == 0: return power(a*a%mod,m//2,mod)%mod else: return a*power(a,m-1,mod)%mod N = int(input()) if N == 1: print(0) else: ans = 0 for n1 in ran...
s705896015
p02554
u252828980
1600087291
Python
Python (3.8.2)
py
Runtime Error
27
9012
99
n = int(input()) MOD = 10**9 + 7 ans = pow(10,n,MOD) - 2*pow(9.n,MOD) - pow(8,n,MOD) print(ans%MOD)
s987905954
p02554
u637289184
1600086581
Python
Python (3.8.2)
py
Runtime Error
26
9136
92
n = int(input()) mod = 10**9+7 print ((pow(10,N,mod) - 2*pow(9,N,mod) + pow(8,N,mod)) % mod)