problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02552
u890419631
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x = int(input())\nif x == 0:\n print(1)\nelif x == 1:\n print(0)\nelse:\n break', 'x = int(input())\nprint(1-x)']
['Runtime Error', 'Accepted']
['s828901490', 's113232826']
[8836.0, 9144.0]
[24.0, 24.0]
[76, 27]
p02552
u894939163
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
["num = int(input())\n\nif(num == '1'): \n print('0')\nelif(num == '0'):\n print('1')", "num = int(input())\n\nif(num == 1): \n print('0')\nelif(num == 0):\n print('1')"]
['Wrong Answer', 'Accepted']
['s282649472', 's780245776']
[9148.0, 9152.0]
[27.0, 33.0]
[80, 76]
p02552
u896403827
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['import sys\nx = int(sys.stdin.read().strip())\nprint int(not x)', 'import sys\nx = int(sys.stdin.read().strip())\nprint(int(not x))']
['Runtime Error', 'Accepted']
['s694515026', 's748477401']
[8648.0, 9088.0]
[27.0, 25.0]
[61, 62]
p02552
u907209585
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x = input()\nif x == 1:\n print(0)\nelse:\n print(1)', 'print(int(input()) ^ 0x01)']
['Wrong Answer', 'Accepted']
['s037013793', 's507736423']
[8796.0, 9128.0]
[26.0, 26.0]
[50, 26]
p02552
u914883924
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x=int(input())\nif x==0;\n print(1)\nelse;\n print(0)', 'x=int(input())\nif x==0:\n print("1")\nelse:\n print("0")\n']
['Runtime Error', 'Accepted']
['s620809301', 's791261736']
[8936.0, 9136.0]
[24.0, 26.0]
[55, 60]
p02552
u915378300
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['def conj(n):\n if n==0:return 1\n return 0\n\nprint(conj(int(input()))', 'def conj(n):\n if n==0:return 1\n return 0\nprint(conj(int(input())))']
['Runtime Error', 'Accepted']
['s854316699', 's570164110']
[8772.0, 9136.0]
[23.0, 32.0]
[68, 68]
p02552
u918601425
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['print(1-int(input())', 'print(1-int(input()))']
['Runtime Error', 'Accepted']
['s519155394', 's017455760']
[8940.0, 9200.0]
[23.0, 30.0]
[20, 21]
p02552
u920103253
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x=int(input)\nprint(abs(1-x))', 'x=int(input())\nprint(abs(1-x))']
['Runtime Error', 'Accepted']
['s197439983', 's150219066']
[8888.0, 9040.0]
[26.0, 28.0]
[28, 30]
p02552
u920463220
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['print(1-int(input())', 'n=int(input())\nprint(1-n)']
['Runtime Error', 'Accepted']
['s422544688', 's206035371']
[9008.0, 9020.0]
[24.0, 28.0]
[20, 25]
p02552
u921676506
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x = input()\n\nif x == 1:\n print(0)\n \nif X == 0:\n print(1)\n ', 'x = input()\n\nif x == 1:\n print(0)\n \nelse:\n print(1)', 'x = input()\nif x == 0:\n print(1)\n else:\n print(0)\n ', 'x = input()\n\nif x == 1:\n print(0)\n \nif x == 0:\n print(1)\n \n', 'print(1 - int(input()))']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s034564490', 's156273302', 's886513252', 's901997397', 's644493124']
[9060.0, 8956.0, 8872.0, 9000.0, 9152.0]
[24.0, 26.0, 23.0, 25.0, 29.0]
[62, 54, 59, 63, 23]
p02552
u929777289
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['print(int(not(bool(x))))', 'if input() == "1":\n print(0)\nelse:\n print(1)']
['Runtime Error', 'Accepted']
['s294069779', 's586766207']
[9028.0, 9088.0]
[24.0, 29.0]
[24, 46]
p02552
u932225778
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x == int(input())\nif x = 1 :\n print(0)\nelse :\n print(1)', 'x = int(input())\nif x == 1 :\n print(0)\nelse :\n print(1)']
['Runtime Error', 'Accepted']
['s223003988', 's272410342']
[8880.0, 9000.0]
[27.0, 29.0]
[59, 59]
p02552
u936988827
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x=input().rstrip.split(" ")\nz=[]\nfor i in range(2):\n\tz.append(x[i-2]*x[0])\n z.append(x[i-2]*x[1])\nprint(max(z))', 'x=input()\n\nif int(x)==1:\n print(0)\nelse:\n print(1)\n']
['Runtime Error', 'Accepted']
['s571192061', 's026057790']
[8876.0, 9028.0]
[30.0, 25.0]
[114, 53]
p02552
u943057856
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x=int(input())\nprint(1 if x==0 else 1)', 'x=int(input())\nprint(1 if x==0 else 0)']
['Wrong Answer', 'Accepted']
['s065550040', 's262704238']
[9144.0, 9144.0]
[29.0, 32.0]
[38, 38]
p02552
u945342410
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['num = input()\nif num is 0:\n print(1)\nif num is 1:\n print(0)', 'num = int(input())\nif num is 0:\n print(1)\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s879735363', 's781038717']
[9024.0, 9148.0]
[31.0, 32.0]
[61, 59]
p02552
u952669998
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['X = int(input())\nif X == 1:\n print(0)\nelse:1\n print(1)\n ', 'X = int(input())\nif X == 1:\n print(0)\nelse:\n print(1)\n\n']
['Runtime Error', 'Accepted']
['s578673797', 's752084996']
[9008.0, 9132.0]
[27.0, 28.0]
[65, 61]
p02552
u952968889
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['print(int(input())+1%2)', 'print((int(input())+1)%2)\n']
['Wrong Answer', 'Accepted']
['s237889237', 's768662148']
[9140.0, 9132.0]
[28.0, 28.0]
[23, 26]
p02552
u954731369
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x = intZ(input())\n\nprint(0 if x else 1)\n', 'x = int(input())\n\nprint(0 if x else 1)\n']
['Runtime Error', 'Accepted']
['s742370848', 's287816980']
[8976.0, 9036.0]
[26.0, 25.0]
[40, 39]
p02552
u956318161
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['d,t,s=map(int,input().split())\nif s*t >= d:\n print("Yes")\nelse:\n print("No")', 'x=int(input())\nif x==1:\n print("0")\nelse:\n print("1")']
['Runtime Error', 'Accepted']
['s030576589', 's791442755']
[9120.0, 9080.0]
[22.0, 27.0]
[78, 55]
p02552
u963963908
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['a,b,c,d = map(int,input().split())\nprint(max(a*c,a*d,b*c,b*d))\n', 'x = int(input())\nif x == 0:\n print(1)\nelse:\n print(0)']
['Runtime Error', 'Accepted']
['s597781786', 's920108898']
[9124.0, 9084.0]
[24.0, 28.0]
[63, 55]
p02552
u964462358
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['print(not int(input()))\n', 'print(!int(input()))', 'print(int(not int(input())))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s555701112', 's705616814', 's103660184']
[9068.0, 9008.0, 9144.0]
[29.0, 28.0, 29.0]
[24, 20, 28]
p02552
u969708690
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['!', 'N=int(input())\nprint(1-N)']
['Runtime Error', 'Accepted']
['s375775688', 's907885780']
[9064.0, 9084.0]
[25.0, 31.0]
[1, 25]
p02552
u972036293
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['print("0") if input()==1 else print("1")', 'print("0") if input()=="1" else print("1")']
['Wrong Answer', 'Accepted']
['s429153149', 's579545655']
[8920.0, 8984.0]
[25.0, 27.0]
[40, 42]
p02552
u973167272
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['def fun(x):\n x = int(input())\n if x=0:\n return 1\n else:\n return 0\n\nprint(fun(x))', 'def fun(x)\n\nx = int(input())\n\nif x=0:\n return 1\nelse:\n return 0\n\nprint(fun(x))', 'def fun(x):\n x = int(input())\n if x==0:\n return 1\n else:\n return 0\n\nprint(fun(x))', 'x = int(input())\nif x==0:\n print(1)\nelse:\n print(0)\n\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s418181834', 's504535631', 's890420621', 's179895141']
[8888.0, 8880.0, 8856.0, 9032.0]
[24.0, 26.0, 24.0, 24.0]
[103, 84, 104, 59]
p02552
u974436134
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x=int(input())\n\nif X==0:\n print(1)\nelif x==1:\n print(0)', 'x=int(input())\n\nif x==0:\n print(1)\nelif x==1:\n print(0)']
['Runtime Error', 'Accepted']
['s064210265', 's571295375']
[9052.0, 9140.0]
[24.0, 26.0]
[57, 57]
p02552
u976282379
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['if __name__ == "__main__":\n main()\n\n\ndef main():\n x = int(input())\n if x:\n print(0)\n else:\n print(1)\n', 'x = int(input())\nif x:\n print(0)\n else:\n print(1)', 'x = int(input())\nif x:\n print(0)\nelse:\n print(1)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s396386183', 's858837771', 's614176266']
[9012.0, 8944.0, 9104.0]
[23.0, 24.0, 27.0]
[127, 51, 55]
p02552
u977982384
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
["x = input()\nif x == 0:\n print('1')\nelif x == 1:\n print('0')", "x = input()\nif x == '0':\n print('1')\nif x == '1':\n print('0')\n "]
['Wrong Answer', 'Accepted']
['s633726890', 's310768895']
[9004.0, 9056.0]
[30.0, 33.0]
[61, 72]
p02552
u981747421
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x = int(input())\nif x ==0:\n x = 1\nelse:\n x = 0', 'x = int(input())\nif x == 0:\n x = 1\nelse:\n x = 0\nprint(x)']
['Wrong Answer', 'Accepted']
['s059696695', 's683622932']
[9040.0, 9144.0]
[24.0, 24.0]
[48, 58]
p02552
u982555398
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['input = input()\nif input is 1:\n\tprint(0)\nif input is 0:\n \tprint(1)', 'input = input()\nif input == 1:\n\tprint(0)\nif input == 0:\n \tprint(1)', 'input = int(input())\nif input == 1:\n\tprint(0)\nif input == 0:\n \tprint(1)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s757999498', 's993143280', 's358036270']
[9088.0, 9080.0, 9148.0]
[28.0, 31.0, 29.0]
[67, 67, 72]
p02552
u984901905
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x = int(input())\nif x = 1:\n print(0)\nelse:\n print(1)', 'x = int(input())\nif x == 1:\n print(0)\nelse:\n print(1)']
['Runtime Error', 'Accepted']
['s519667705', 's654384151']
[8940.0, 9060.0]
[24.0, 30.0]
[54, 55]
p02552
u985930315
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['tmp = input()\nif tmp = "0":\n print("1")\nelse:\n print("0")', 'tmp = input()\nif tmp =="0":\n print("1")\nelse:\n print("0")']
['Runtime Error', 'Accepted']
['s840055187', 's844364120']
[8908.0, 9088.0]
[24.0, 26.0]
[59, 59]
p02552
u988466483
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x = int(input()) if x==0: print("1") else: print("0")', 'x= int(input())\nif x==0:\n print("1")\nelse: \n print("0")']
['Runtime Error', 'Accepted']
['s399649681', 's855013985']
[9008.0, 9156.0]
[28.0, 26.0]
[61, 57]
p02552
u994150314
2,000
1,048,576
Given is an integer x that is greater than or equal to 0, and less than or equal to 1. Output 1 if x is equal to 0, or 0 if x is equal to 1.
['x = int(input())\n\nif x == 0:\n print(x)\nelif x == 1:\n print(x)', 'x = int(input())\n\nif x == 0:\n print(1)\nelif x == 1:\n print(0)']
['Wrong Answer', 'Accepted']
['s829290975', 's347161468']
[9088.0, 9144.0]
[29.0, 26.0]
[63, 63]
p02554
u002067779
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nx = 10**n%(10**9+7) + 8**n%(10**9+7) - 2 * 9**n%(10**9+7)\nprint(x%(10**9+7))', 'n = int(input())\nx = 10**n//(10**9+7) + 8**n//(10**9+7) - 2 * 9**n//(10**9+7)\nprint(x//(10**9+7))', 'n = int(input())\nx = 10**n%(10**9+7) + 8**n%(10**9+7) - 2 * 9**n%(10**9+7)\nprint(x%(10**9+7))\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s158607218', 's569441301', 's345819960']
[9008.0, 11076.0, 10744.0]
[28.0, 2206.0, 402.0]
[101, 97, 94]
p02554
u013617325
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
["#!/usr/bin/env python3\nimport sys\n\nMOD = 1000000007 # type: int\n\n\ndef solve(N: int):\n return N*10**(N-2)%MOD\n\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n N = int(next(tokens)) # type: int\n solve(N)\n\nif __name__ == '__main__':\n main()\n", "#!/usr/bin/env python3\nimport sys\n\nMOD = 1000000007 # type: int\n\n\ndef solve(N: int):\n return print((10**N - 2*9**N + 8**N))\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n N = int(next(tokens)) # type: int\n solve(N)\n\nif __name__ == '__main__':\n main()\n~ \n~ ", "#!/usr/bin/env python3\nimport sys\n\nMOD = 1000000007 # type: int\n\n\ndef solve(N: int):\n return print((10**N - 2*9**N + 8**N)%MOD)\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n N = int(next(tokens)) # type: int\n solve(N)\n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s325976227', 's381562688', 's695202621']
[10676.0, 9016.0, 11012.0]
[199.0, 24.0, 398.0]
[538, 711, 556]
p02554
u021019433
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['M = 10**9 + 7\nn = int(input())\nprint((pow(10, n, M) - 2 * pow(9, n, M) + pow(8, n, M) % M)\n', 'M = 10**9 + 7\nn = int(input())\nprint((pow(10, n, M) - 2 * pow(9, n, M) + pow(8, n, M)) % M)\n']
['Runtime Error', 'Accepted']
['s674050574', 's312217530']
[8916.0, 9152.0]
[27.0, 26.0]
[91, 92]
p02554
u027561659
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['def powmod(a, n, p):\n if(n==0):\n return 1\n elif(n==1):\n return a%p\n elif(n%2==1):\n return ((a%p)*(powmod(a,n//2,p)**2%p))%p\n elif(n%2==0):\n return powmod(a,n//2,p)**2%p\nN=int(input())\nif(N==1):\n print(0)\nelse:\n print(powmod(10,N-2,10**9+7))\n', 'N=int(input())\nif(N==1):\n print(0)\nelse:\n result = (-7)**(N-2) if(N%2==0)else 1000000007-7**(N-2)\n print(result)', 'def powmod(a, n, p):\n if(n==0):\n return 1\n elif(n==1):\n return a%p\n elif(n%2==1):\n return ((a%p)*(powmod(a,n//2,p)**2%p))%p\n elif(n%2==0):\n return powmod(a,n//2,p)**2%p\nN=int(input())\nif(N==1):\n print(0)\nelse:\n print(powmod(10,N-2))', 'def powmod(a, n, p):\n if(n==0):\n return 2\n elif(n==1):\n return a%p\n elif(n%2==1):\n return ((a%p)*(powmod(a,n//2,p)**2%p))%p\n elif(n%2==0):\n return powmod(a,n//2,p)**2%p\nN=int(input())\np=10**9+7\nif(N==1):\n print(0)\nelse:\n print((powmod(10,N,p)-2*powmod(9,N,p)+powmod(8,N,p))%p)\n']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s112708672', 's112753027', 's492658639', 's714641401']
[9196.0, 10124.0, 9192.0, 9196.0]
[28.0, 2206.0, 28.0, 30.0]
[283, 115, 274, 323]
p02554
u030964079
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nMOD = int(1e9 + 7)\n\na, b, c = 1, 1, 1\n\nfor i in range(n):\n a *= 10;\n b *= 18;\n c *= 8;\n a %= MOD;\n b %= MOD;\n c %= MOD;\n \nprint((a - b + c) % MOD);', 'n = int(input())\nMOD = int(1e9 + 7)\n\ncnt = n * (n - 1) % MOD\n\nfor i in range(n - 2):\n cnt *= 9\n cnt %= MOD', 'n = int(input())\nMOD = int(1e9 + 7)\n\na, b, c = 1, 1, 1\n\nfor i in range(n):\n a *= 10;\n b *= 9;\n c *= 8;\n a %= MOD;\n b %= MOD;\n c %= MOD;\n \nprint((a - 2 * b + c) % MOD);']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s050967230', 's089559625', 's068655482']
[8852.0, 8900.0, 8900.0]
[491.0, 195.0, 470.0]
[185, 112, 188]
p02554
u086644516
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N = int(input())\nMOD = 1000000000 + 7\ndef power_func(a,n,p):\n bi = str(format(n,"b"))\n res = 1\n for i in range(len(bi)):\n res = (res*res) %p\n if bi[i] == "1":\n res = (res*a) %p\n return res\nprint(str((power_func(10, N, MOD) - 2 * power_func(9, N, MOD) + power_func(8, N, MOD) % MOD))\n', 'N = int(input())\nMOD = 1000000000 + 7\nprint((pow(10, N, MOD) - 2 * pow(9, N, MOD) + pow(8, N, MOD)) % MOD)\n']
['Runtime Error', 'Accepted']
['s421146796', 's839304071']
[8880.0, 9156.0]
[27.0, 29.0]
[334, 108]
p02554
u146575240
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['\nimport math\nN = int(input())\na = 10**9+7\n\nans = (10**N)-(9**N - 8**N)\n\n\n# return math.factorial(n)%a // (math.factorial(n - r)%a * math.factorial(r))%a\n#\n# ans =(10**(N-2))%a*(combinations_count(N, 2)*2)%a-combinations_count(N, 2)%a\nprint(ans%a)', '\nimport math\nN = int(input())\na = 10**9+7\n\nans = (10**N)-9**N - 8**N\n\n\n# return math.factorial(n)%a // (math.factorial(n - r)%a * math.factorial(r))%a\n#\n# ans =(10**(N-2))%a*(combinations_count(N, 2)*2)%a-combinations_count(N, 2)%a\nprint(ans%a)\n', '\nimport math\nN = int(input())\na = 10**9+7\n\nans = (10**N)-(2*9**N - 8**N)\n\n\n# return math.factorial(n)%a // (math.factorial(n - r)%a * math.factorial(r))%a\n#\n# ans =(10**(N-2))%a*(combinations_count(N, 2)*2)%a-combinations_count(N, 2)%a\nprint(ans%a)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s266515328', 's862095003', 's904428531']
[11100.0, 10716.0, 11128.0]
[402.0, 399.0, 399.0]
[294, 293, 296]
p02554
u153047519
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\na, b, c = 1, 1, 1\nfor i in range(n):\n a, b, c = a * 10, b * 9, c * 8\n a, b, c = a % (10**9+7), b % (10**9+7), , c % (10**9+7)\nprint(0 if n==1 else (a - b*2 + c) % (10**9+7))', 'n = int(input())\na, b, c = 1, 1, 1\nfor i in range(n):\n a, b, c = a * 10, b * 9, c * 8\n a, b, c = a % (10**9+7), b % (10**9+7), c % (10**9+7)\nprint(0 if n==1 else (a - b*2 + c) % (10**9+7))']
['Runtime Error', 'Accepted']
['s714292631', 's443280345']
[9024.0, 9184.0]
[26.0, 521.0]
[192, 190]
p02554
u159144188
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N = int(input())\nans = 10**N - 2*(9**N) - 8**N\nprint(ans)', 'N = int(input())\nprint(10**N-2*9**N-8**N)', 'N = int(input())\nans = (10**N - 2*(9**N) + 8**N) % (10**9+7)\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s338140520', 's766921357', 's939830956']
[11008.0, 10832.0, 11048.0]
[2206.0, 2206.0, 393.0]
[57, 41, 71]
p02554
u163501259
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
["import sys\ninput = sys.stdin.readline\ndef main():\n N = int(input())\n M = 10**9 + 7\n if N == 1:\n print(0)\n return\n ans = 0\n ans = 10**N - (9**N)*2 + 8**N - 2\n print(ans%M) \n\nif __name__ == '__main__':\n main()", "import sys\ninput = sys.stdin.readline\ndef main():\n N = int(input())\n M = 10**9 + 7\n if N == 1:\n print(0)\n return\n ans = 0\n ans = 10**N - (9**N)*2 + 8**N \n print(ans%M) \n\nif __name__ == '__main__':\n main()"]
['Wrong Answer', 'Accepted']
['s248624302', 's359622541']
[11112.0, 11056.0]
[390.0, 399.0]
[245, 242]
p02554
u167993508
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['def binexp(b):\n res = 1\n while b>0:\n if b&1:\n res *= a\n res%=mod\n a *= a\n a%=mod\n b>>=1\n return res\nmod = 1000000007\nn = int(input())\nif n==1:\n print(0)\nelif n==2:\n print(1)\nelse:\n count = 1\n n -= 2\n ans = binexp(n)\n print(ans)', 'def binexp(a,b):\n res = 1\n while b>0:\n if b&1:\n res *= a\n res%=mod\n a *= a\n a%=mod\n b>>=1\n return res\nmod = 1000000007\nn = int(input())\nif n==1:\n print(0)\nelif n==2:\n print(2)\nelse:\n ans = binexp(10,n)\n ans1 = binexp(9,n)\n ans2 = binexp(8,n)\n print((ans-2*ans1+ans2)%mod)\n']
['Runtime Error', 'Accepted']
['s656171727', 's029353674']
[9012.0, 9108.0]
[28.0, 29.0]
[258, 303]
p02554
u168416324
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['a,b,c,d=map(int,input().split())\n\nif a*b>0 and c*d>0 and (a<0 ^ c<0):\n ans=max(a*d,b*c)\nelse:\n ans=max(a*c,b*d)\nprint(ans)', 'n=int(input())\nmod=(1e+9)+7\nx=1\nif n>=2:\n ans=1\nelse:\n ans=0\nfor i in range(n):\n x*=10\n ans*=8\n ans%=mod\n x%=mod\nnin=1\n\nfor i in range(n):\n nin*=9\n nin%=mod\nx+=ans\nx%=mod\nx-=(nin*2)%mod\nif x<0:\n x+=mod\nif n==1:\n print(0)\nelse:\n print(int(x%mod))']
['Runtime Error', 'Accepted']
['s375844191', 's568815274']
[9168.0, 9204.0]
[34.0, 448.0]
[124, 256]
p02554
u185034753
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['def main():\n n = int(input())\n MOD = 10**9 + 7\n\n if n == 1:\n ans = 0\n elif n == 2:\n ans = 1\n else:\n ans = pow(10, n, MOD) - 2 * pow(9, n, MOD) + pow(8, n, MOD)\n ans %= MOD\n print(ans)\n\n\nif __name__ == "__main__":\n main()', 'def main():\n n = int(input())\n MOD = 10**9 + 7\n\n if n == 1:\n ans = 0\n elif n == 2:\n ans = 2\n else:\n ans = pow(10, n, MOD) - 2 * pow(9, n, MOD) + pow(8, n, MOD)\n ans %= MOD\n print(ans)\n\n\nif __name__ == "__main__":\n main()']
['Wrong Answer', 'Accepted']
['s442924423', 's397234957']
[9064.0, 9072.0]
[30.0, 28.0]
[269, 269]
p02554
u188228787
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N = int(input())\n\n\ndef ruizyou(x, n, S=1):\n \n S = 1\n for _ in range(n):\n S = (S*x)%(1e9+7)\n \n return S\n \na = int( ruizyou(10, N) + ruizyou(8, N) - ruizyou(9, N)*2 )\n\nprint(a%(1e9+7))', 'N = int(input())\n \n \ndef ruizyou(x, n, S=1):\n \n S = 1\n for _ in range(n):\n S = (S*x)%(1e9+7)\n \n return S\n \na = int( ruizyou(10, N) + ruizyou(8, N) - ruizyou(9, N)*2 )\n \nprint(int(a%(1e9+7)))']
['Wrong Answer', 'Accepted']
['s609472622', 's576070580']
[9100.0, 8824.0]
[247.0, 245.0]
[207, 215]
p02554
u223904637
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n=int(input())\nmod=10**9+7\nans=pow(n,10,mod)\nans-=2*pow(n,9,mod)\nans+=pow(n,8,mod)\nprint(ans%mod)', 'n=int(input())\nmod=10**9+7\nans=pow(10,n,mod)\nans-=2*pow(9,n,mod)\nans+=pow(8,n,mod)\nprint(ans%mod)']
['Wrong Answer', 'Accepted']
['s985443590', 's817132725']
[9068.0, 9060.0]
[29.0, 30.0]
[97, 97]
p02554
u230621983
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nMOD = 10**9 + 7\nif n == 1:\n print(0)\nelif n == 2:\n print(1)\nelse:\n ans = pow(10, n, MOD) + pow(8, n, MOD) - 2 * pow(9, n, MOD)\n print(ans % MOD)', 'n = int(input())\nMOD = 10**9 + 7\nif n == 1:\n print(0)\nelif n == 2:\n print(2)\nelse:\n ans = pow(10, n, MOD) + pow(8, n, MOD) - 2 * pow(9, n, MOD)\n print(ans % MOD)']
['Wrong Answer', 'Accepted']
['s992454024', 's978218672']
[9068.0, 9164.0]
[33.0, 31.0]
[173, 173]
p02554
u231905444
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nans = 1\nans1 = 1\nans2 = 1\nmod = 1000000007\nfor i in range(n):\n\tans = (ans*10)%mod\n ans2 = (ans2*8)%mod\n\tans1 = (ans1*9)%mod\nans = (ans - ans1 + mod)%mod\nans = (ans - ans1 + mod)%mod\nans = (ans + ans2)%mod\nprint(ans)\n', 'n = int(input())\nans = 1\nans2 = 1\nmod = 1000000007\nfor i in range(n):\n\tans = (ans*10)%mod\n\tans2 = (ans2*8)%mod\nans = (ans - ans2 + mod)%mod\nprint(ans)\n', 'n = int(input())\nans = 1\nans2 = 1\nmod = 1000000007\nfor i in range(n):\n\tans = (ans*10)%mod\n ans2 = (ans2*8)%mod\nans = (ans - ans2 + mod)%mod\nprint(ans)', 'n = int(input())\nans = 1\nans1 = 1\nans2 = 1\nmod = 1000000007\nfor i in range(n):\n\tans = (ans*10)%mod\n\tans2 = (ans2*8)%mod\n\tans1 = (ans1*9)%mod\nans = (ans - ans1 + mod)%mod\nans = (ans - ans1 + mod)%mod\nans = (ans + ans2)%mod\nprint(ans)\n']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s278835103', 's384128860', 's741447698', 's710843109']
[8952.0, 9080.0, 8904.0, 9100.0]
[22.0, 276.0, 26.0, 393.0]
[236, 151, 153, 233]
p02554
u237380198
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nans = (((n - 1) ** 8 % 1000000007) * (2 * n - 1)) % 1000000007\nprint(ans)', 'n = int(input())\nans = (((10 ** n) - 1) - (9 ** n) - (9 ** n) + (8 ** n) + 1) % 1000000007\nprint(ans)']
['Wrong Answer', 'Accepted']
['s975337801', 's398863227']
[9104.0, 11076.0]
[30.0, 580.0]
[90, 101]
p02554
u239228953
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nx = n*(n-1)%1000000007\ny = 10**(n-2)%1000000007\nprint((x*y)%1000000007', 'n = int(input())\nr = (10**n)-2*(9**n)+8**n\nr%=(10**9+7)\nprint(r)']
['Runtime Error', 'Accepted']
['s823558455', 's289616613']
[8956.0, 11080.0]
[28.0, 388.0]
[87, 64]
p02554
u240444124
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n=int(input())\nM=10**9+7\nprint((pow(10,n,M)-pow(8,n,M))%M)', 'n=int(input())\nM=10**9+7\nprint((pow(10,n,M)+pow(8,n,M)-2*pow(9,n,M))%M)']
['Wrong Answer', 'Accepted']
['s188485554', 's856860392']
[9156.0, 9156.0]
[30.0, 26.0]
[58, 71]
p02554
u241190800
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nif n >=2:\n ans = (10**(n-2)*n*(n-1))/(10**9 + 7)\nelse:\n ans = 0\nprint(ans)', 'n = int(input())\nprint((10**n -2*9**n + 8**n)/1000000007)', 'n = int(input())\nprint((10**n -2*9**n +8**n) % 1000000007)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s794932383', 's864237364', 's495011785']
[10392.0, 10944.0, 10944.0]
[201.0, 386.0, 389.0]
[93, 57, 58]
p02554
u243312682
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
["def main():\n n = int(input())\n mod = 10 ** 9 + 7 \n \n def modpow(x, n, mod):\n res = 1\n while n:\n if n % 2:\n res *= x % mod\n res %= res\n x *= x % mod\n n >>= 1\n return res\n \n \n all_p = modpow(10, n, mod)\n \n not_0 = modpow(9, n, mod)\n \n not_9 = modpow(9, n, mod)\n \n not_0_9 = modpow(8, n, mod)\n \n ans = (all_p - not_0 - not_9 + not_0_9) % mod\n print(ans)\n \nif __name__ == '__main__':\n main()", "def main():\n n = int(input())\n mod = 10 ** 9 + 7 \n \n def modpow(x, n, mod):\n res = 1\n while n:\n if n % 2:\n res *= x % mod\n res %= mod\n x *= x % mod\n n >>= 1\n return res\n \n \n all_p = modpow(10, n, mod)\n \n not_0 = modpow(9, n, mod)\n \n not_9 = modpow(9, n, mod)\n \n not_0_9 = modpow(8, n, mod)\n \n ans = (all_p - not_0 - not_9 + not_0_9) % mod\n print(ans)\n \nif __name__ == '__main__':\n main()\n"]
['Runtime Error', 'Accepted']
['s248999346', 's824187588']
[9076.0, 9140.0]
[24.0, 25.0]
[694, 695]
p02554
u247211039
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N=int(input())\n\na=2**N-2\nMOD=10**9+7\n\np=1\nb=0\nimport math\nfor i in range(1,N):\n p=(math.factorial(N))/math.factorial((N-i))\n b=p*8+(2**(N-i)-2)%MOD\nans=a+b%MOD\nprint(int(ans))', 'N=int(input())\nMOD=10**9+7\n\nans=10**N %MOD\nans=ans-2*9**N %MOD\nans=ans+8**N %MOD\n\nprint(ans%MOD)']
['Wrong Answer', 'Accepted']
['s413321642', 's096837205']
[14948.0, 10728.0]
[2206.0, 390.0]
[181, 96]
p02554
u252828980
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nMOD = 10**9 + 7\nans = pow(10,n,MOD) - 2*pow(9.n,MOD) - pow(8,n,MOD)\nprint(ans%MOD)', 'n = int(input())\nMOD = 10**9 + 7\nans = pow(10,n,MOD) - 2*pow(9,n,MOD) - pow(8,n,MOD)\nprint(ans%MOD)', 'n = int(input())\nMOD = 10**9 + 7\nans = pow(10,n,MOD) - 2*pow(9,n,MOD) + pow(8,n,MOD)\nprint(ans%MOD)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s705896015', 's975116379', 's042426558']
[9012.0, 9064.0, 9100.0]
[27.0, 26.0, 31.0]
[99, 99, 99]
p02554
u262646906
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['import sys\nN = int(input())\n\nif N == 1:\n print(0)\n sys.exit(0)\n\nif N == 2:\n print(1)\n sys.exit(0)\n\n# out = (N * (N - 1) * (10 ** (N - 2))) % ((10 ** 9) + 7)\nout = ((10 ** N) - ((9 ** N) * 2 - (8 ** N))) % ((10 ** 9) + 7)\nprint(out)\n', 'import sys\nN = int(input())\n\nif N == 1:\n print(0)\n sys.exit(0)\n\nif N == 2:\n print(2)\n sys.exit(0)\n\n# out = (N * (N - 1) * (10 ** (N - 2))) % ((10 ** 9) + 7)\nout = ((10 ** N) - ((9 ** N) * 2 - (8 ** N))) % ((10 ** 9) + 7)\nprint(out)\n']
['Wrong Answer', 'Accepted']
['s025051730', 's745223803']
[11196.0, 10952.0]
[400.0, 398.0]
[244, 244]
p02554
u290886932
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['MOD = 1000000007\ndef modpow(a, n, mod) :\n ret = 1\n while n > 0:\n if n % 2 == 1:\n ret = ret * a % mod \n a = a * a % mod\n n = n // 2\n return ret\n\nN = int(input())\nprint(modpow(2,10,1000))\nif N < 2:\n print(0)\nelif N == 3:\n print(2)\nelse:\n ret1 = modpow(10,N,MOD) \n ret2 = modpow(8,N,MOD)\n ret3 = modpow(9,N,MOD)\n ret = (ret1 - ret3 - ret3 + ret2) % MOD\n print(ret)', 'MOD = 1000000007\ndef modpow(a, n, mod) :\n ret = 1\n while n > 0:\n if n % 2 == 1:\n ret = ret * a % mod \n a = a * a % mod\n n = n // 2\n return ret\n\nN = int(input())\n\nret1 = modpow(10,N,MOD) \nret2 = modpow(8,N,MOD)\nret3 = modpow(9,N,MOD)\nret = (ret1 - ret3 - ret3 + ret2) % MOD\nprint(ret)']
['Wrong Answer', 'Accepted']
['s452408914', 's963765625']
[9208.0, 9200.0]
[30.0, 28.0]
[416, 331]
p02554
u292260747
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n=int(input())\n#ans=(n*(n-1))//2*pow(8,n-2)\n#ans=(pow(10,n)-pow(8,n))%1000000007\nans=(10**n-8**n)%1000000007\nprint(ans%1000000007)\n ', 'n=int(input())\nans=(pow(10,n)-2*pow(9,n)+pow(8,n))%1000000007\nprint(ans%1000000007)\n ']
['Wrong Answer', 'Accepted']
['s241580360', 's814750806']
[10500.0, 11104.0]
[216.0, 398.0]
[135, 88]
p02554
u309120194
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N = int(input())\n\nm = 10**9 + 7\na = 10**N\nb = 2*9**N\nc = 8**N\n\na %= m\nb %= m\nc %= m\n\nans = a+b-c\nans %= m\nprint(ans)', 'N = int(input())\n\n\n\n\n\n\n\n\nans = 10**N - 2*9**N + 8**N\nans %= 10**9+7\n \nprint(ans)']
['Wrong Answer', 'Accepted']
['s942855110', 's656241902']
[11016.0, 10960.0]
[399.0, 391.0]
[116, 527]
p02554
u325149030
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['mod = 10**9+7\nN = int(input())\nans = (pow(a,N,mod) - 2*pow(b, N, mod) + pow(c, N, mod))%mod\nif ans < 0:\n ans += mod\nprint(ans)\n', 'mod = 10**9+7\nN = int(input())\nans = (pow(10,N,mod) - 2*pow(9, N, mod) + pow(8, N, mod))%mod\nif ans < 0:\n ans += mod\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s768630020', 's913226651']
[9160.0, 9072.0]
[24.0, 27.0]
[130, 131]
p02554
u329319441
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N = int(input())\nMOD = 10 ** 9 + 7\nif N == 1:\n print(0)\n exit()\na = 1\nb = 1\nc = 1\nfor i in range(N):\n a = pow(10, n, MOD)\n b = pow(9, n, MOD)\n c = pow(8, n, MOD)\nans = a - (2 * b) + c\nif ans < 0:\n ans += MOD\nprint(ans)', 'N = int(input())\nMOD = 10 ** 9 + 7\nif N == 1:\n print(0)\n exit()\na = pow(10, N, MOD)\nb = pow(9, N, MOD)\nc = pow(8, N, MOD)\nans = (a - (2 * b) + c) % MOD\nif ans < 0:\n ans += MOD\nprint(ans)']
['Runtime Error', 'Accepted']
['s771627587', 's107807922']
[9144.0, 8848.0]
[24.0, 29.0]
[224, 189]
p02554
u347502437
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['def main():\n N = input()\n print((10 ** N - 9 ** N - 9 ** N + 8 ** N)%(10**9 + 7))\n\nmain()', 'def main():\n N = int(input())\n print((10**N - 9**N - 9**N + 8**N)%(10**9 + 7))\n\nmain()\n']
['Runtime Error', 'Accepted']
['s525850080', 's825518618']
[9012.0, 11244.0]
[29.0, 569.0]
[95, 93]
p02554
u364741711
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\n\nc = 1\nans =1\n\nfor i in range(n) :\n ans = ans * (pow(8,i+1)%1000000007) % 1000000007\nprint(ans)', 'n = int(input())\n\na=1\nb=1\nc=1\n\nfor i in range(n):\n a = (a * 10) % 1000000007\nfor i in range(n):\n b = (b * 9) % 1000000007\nfor i in range(n):\n c = (c * 8) % 1000000007\n\nprint((a-b-b+c)% 1000000007)']
['Wrong Answer', 'Accepted']
['s541253598', 's930196709']
[9152.0, 9192.0]
[2206.0, 447.0]
[115, 199]
p02554
u366558796
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nn = int(input())\nmod = int(1e9)+7\nprint((pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, mod))%mod)', 'n = int(input())\nmod = int(1e9)+7\nprint((pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, mod))%mod)']
['Runtime Error', 'Accepted']
['s536315354', 's178631629']
[9120.0, 9192.0]
[26.0, 29.0]
[115, 98]
p02554
u370986618
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['#include <bits/stdc++.h>\nusing namespace std;\n\n#define pb(a) push_back((a))\n\n\n#define REP2(a, b) for (ll j = (a); j < (b); j++)\n#define REPE(a, b, c, d) \\\n REP(a, b) \\\n for (ll j = (c); j < (d); j++)\n#define REPV(a, b, c) for (ll(a) = b; (a) < (c); (a)++)\n\n#define IREP2(a, b) for (ll j = (a); j >= (b); j--)\n#define IREPV(a, b, c) for (ll(a) = b; (a) >= (c); (a)--)\n#define all(v) (v).begin(), (v).end()\n#define trvs(c) for (auto &it : c)\n#define INF 1e18\n\n\n ios_base::sync_with_stdio(false); \\\n cin.tie(0); \\\n cout.tie(0);\n#define F first\n#define S second\n#define MOD 1000000007\n\nusing ll = long long;\nusing vll = vector<ll>;\nusing vvll = vector<vll>;\nusing pll = pair<ll, ll>;\nusing vpll = vector<pll>;\nusing vvpll = vector<vpll>;\n#define _DEBUG 1\n#if _DEBUG\n\n\n\n\n\n cout << #x << "=" << x << " "; \\\n debug4(y, z, w, t);\n\n cout << #p << " " << p << " " << #x << "=" << x << " "; \\\n debug4(y, z, w, t);\n\n cout << \n debug6(p, x, y, z, w, t);\n#define wait \\\n int xxxx; \\\n cin >> xxxx;\n\n\n\n\n\n cerr << #x << "=" << x << " "; \\\n derr4(y, z, w, t);\n\n cerr << #p << " " << p << " " << #x << "=" << x << " "; \\\n derr4(y, z, w, t);\n\n cerr << \n derr6(p, x, y, z, w, t);\nll checkpoint_counter = 0;\n\n\n#else\n\n\n\n\n\n\n\n#define wait ;\n\n\n\n\n\n\n\n\n#endif\n\n#define print_matrix(a, n, m) \\\n REPE(0, n, 0, m) { cout << (a)[i][j] << ((j == m - 1) ? \'\\n\' : \' \'); }\n\n\n\n// auto cmp = [](pair<ll, pair<ll, ll>> a, pair<ll, pair<ll, ll>> b) {\n// if (a.F == b.F)\n// return a.S.F > b.S.F;\n// return a.F > b.F;\n// };\n//decltype(cmp)\n// set.count(x)==0 not present\n// accumulate (all(a),sum) or accumulate(all(a),sum,myfunc)\n//partial_sum(all(a),b) a and b are vectors puts prefix array of a in b\n// partial_sum(all(a),b,myfunc)\n//g++ -std=c++17 .\\ans.cpp | ./a.exe\nbool cmp(ll a, ll b)\n{\n if (abs(a) == abs(b))\n {\n return a > b;\n }\n return abs(a) > abs(b);\n}\n\nlong long binpow(long long a, long long b, long long m = MOD)\n{\n a %= m;\n long long res = 1;\n while (b > 0)\n {\n if (b & 1)\n res = res * a % m;\n a = a * a % m;\n b >>= 1;\n }\n return res;\n}\n\nvoid solve()\n{\n ll n;\n cin >> n;\n ll ans = (binpow(10, n) % MOD - 2 * binpow(9, n) % MOD + binpow(8, n) MOD + MOD) % MOD;\n cout << ans << endl;\n}\n\nint main()\n{\n flash\n\n\n ll t;\n // cin >> t;\n // while (t--)\n solve();\n cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\\n";\n return 0;\n}', '#include <bits/stdc++.h>\nusing namespace std;\n\n#define pb(a) push_back((a))\n\n\n#define REP2(a, b) for (ll j = (a); j < (b); j++)\n#define REPE(a, b, c, d) \\\n REP(a, b) \\\n for (ll j = (c); j < (d); j++)\n#define REPV(a, b, c) for (ll(a) = b; (a) < (c); (a)++)\n\n#define IREP2(a, b) for (ll j = (a); j >= (b); j--)\n#define IREPV(a, b, c) for (ll(a) = b; (a) >= (c); (a)--)\n#define all(v) (v).begin(), (v).end()\n#define trvs(c) for (auto &it : c)\n#define INF 1e18\n\n\n ios_base::sync_with_stdio(false); \\\n cin.tie(0); \\\n cout.tie(0);\n#define F first\n#define S second\n#define MOD 1000000007\n\nusing ll = long long;\nusing vll = vector<ll>;\nusing vvll = vector<vll>;\nusing pll = pair<ll, ll>;\nusing vpll = vector<pll>;\nusing vvpll = vector<vpll>;\n#define _DEBUG 1\n#if _DEBUG\n\n\n\n\n\n cout << #x << "=" << x << " "; \\\n debug4(y, z, w, t);\n\n cout << #p << " " << p << " " << #x << "=" << x << " "; \\\n debug4(y, z, w, t);\n\n cout << \n debug6(p, x, y, z, w, t);\n#define wait \\\n int xxxx; \\\n cin >> xxxx;\n\n\n\n\n\n cerr << #x << "=" << x << " "; \\\n derr4(y, z, w, t);\n\n cerr << #p << " " << p << " " << #x << "=" << x << " "; \\\n derr4(y, z, w, t);\n\n cerr << \n derr6(p, x, y, z, w, t);\nll checkpoint_counter = 0;\n\n\n#else\n\n\n\n\n\n\n\n#define wait ;\n\n\n\n\n\n\n\n\n#endif\n\n#define print_matrix(a, n, m) \\\n REPE(0, n, 0, m) { cout << (a)[i][j] << ((j == m - 1) ? \'\\n\' : \' \'); }\n\n\n\n// auto cmp = [](pair<ll, pair<ll, ll>> a, pair<ll, pair<ll, ll>> b) {\n// if (a.F == b.F)\n// return a.S.F > b.S.F;\n// return a.F > b.F;\n// };\n//decltype(cmp)\n// set.count(x)==0 not present\n// accumulate (all(a),sum) or accumulate(all(a),sum,myfunc)\n//partial_sum(all(a),b) a and b are vectors puts prefix array of a in b\n// partial_sum(all(a),b,myfunc)\n//g++ -std=c++17 .\\ans.cpp | ./a.exe\nbool cmp(ll a, ll b)\n{\n if (abs(a) == abs(b))\n {\n return a > b;\n }\n return abs(a) > abs(b);\n}\n\nlong long binpow(long long a, long long b, long long m = MOD)\n{\n a %= m;\n long long res = 1;\n while (b > 0)\n {\n if (b & 1)\n res = res * a % m;\n a = a * a % m;\n b >>= 1;\n }\n return res;\n}\n\nvoid solve()\n{\n ll n;\n cin >> n;\n ll ans = (binpow(10, n) % MOD - 2 * binpow(9, n) % MOD + binpow(8, n)% MOD + MOD) % MOD;\n cout << ans << endl;\n}\n\nint main()\n{\n flash\n\n\n ll t;\n // cin >> t;\n // while (t--)\n solve();\n cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\\n";\n return 0;\n}', '#include <bits/stdc++.h>\nusing namespace std;\n\n#define pb(a) push_back((a))\n\n\n#define REP2(a, b) for (ll j = (a); j < (b); j++)\n#define REPE(a, b, c, d) \\\n REP(a, b) \\\n for (ll j = (c); j < (d); j++)\n#define REPV(a, b, c) for (ll(a) = b; (a) < (c); (a)++)\n\n#define IREP2(a, b) for (ll j = (a); j >= (b); j--)\n#define IREPV(a, b, c) for (ll(a) = b; (a) >= (c); (a)--)\n#define all(v) (v).begin(), (v).end()\n#define trvs(c) for (auto &it : c)\n#define INF 1e18\n\n\n ios_base::sync_with_stdio(false); \\\n cin.tie(0); \\\n cout.tie(0);\n#define F first\n#define S second\n#define MOD 1000000007\n\nusing ll = long long;\nusing vll = vector<ll>;\nusing vvll = vector<vll>;\nusing pll = pair<ll, ll>;\nusing vpll = vector<pll>;\nusing vvpll = vector<vpll>;\n#define _DEBUG 1\n#if _DEBUG\n\n\n\n\n\n cout << #x << "=" << x << " "; \\\n debug4(y, z, w, t);\n\n cout << #p << " " << p << " " << #x << "=" << x << " "; \\\n debug4(y, z, w, t);\n\n cout << \n debug6(p, x, y, z, w, t);\n#define wait \\\n int xxxx; \\\n cin >> xxxx;\n\n\n\n\n\n cerr << #x << "=" << x << " "; \\\n derr4(y, z, w, t);\n\n cerr << #p << " " << p << " " << #x << "=" << x << " "; \\\n derr4(y, z, w, t);\n\n cerr << \n derr6(p, x, y, z, w, t);\nll checkpoint_counter = 0;\n\n\n#else\n\n\n\n\n\n\n\n#define wait ;\n\n\n\n\n\n\n\n\n#endif\n\n#define print_matrix(a, n, m) \\\n REPE(0, n, 0, m) { cout << (a)[i][j] << ((j == m - 1) ? \'\\n\' : \' \'); }\n\n\n\n// auto cmp = [](pair<ll, pair<ll, ll>> a, pair<ll, pair<ll, ll>> b) {\n// if (a.F == b.F)\n// return a.S.F > b.S.F;\n// return a.F > b.F;\n// };\n//decltype(cmp)\n// set.count(x)==0 not present\n// accumulate (all(a),sum) or accumulate(all(a),sum,myfunc)\n//partial_sum(all(a),b) a and b are vectors puts prefix array of a in b\n// partial_sum(all(a),b,myfunc)\n//g++ -std=c++17 .\\ans.cpp | ./a.exe\nbool cmp(ll a, ll b)\n{\n if (abs(a) == abs(b))\n {\n return a > b;\n }\n return abs(a) > abs(b);\n}\n\nlong long binpow(long long a, long long b, long long m = MOD)\n{\n a %= m;\n long long res = 1;\n while (b > 0)\n {\n if (b & 1)\n res = res * a % m;\n a = a * a % m;\n b >>= 1;\n }\n return res;\n}\n\nvoid solve()\n{\n ll n;\n cin >> n;\n ll ans = (binpow(10, n) % MOD - (2 * binpow(9, n)) % MOD + binpow(8, n)% MOD + MOD) % MOD;\n cout << ans << endl;\n}\n\nint main()\n{\n flash\n\n\n ll t;\n // cin >> t;\n // while (t--)\n solve();\n cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\\n";\n return 0;\n}', 'n = int(input())\n\nans = (pow(10, n)-2*pow(9, n)+pow(8, n)) % (10**9+7)\nprint(ans)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s043220515', 's315556157', 's733703575', 's541589646']
[8820.0, 8648.0, 8980.0, 10920.0]
[26.0, 26.0, 26.0, 399.0]
[4360, 4361, 4363, 82]
p02554
u374802266
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n,m=int(input()),10**9+7\nprint((pow(10,p,m)-2*pow(9,p,m)+pow(8,p,m))%m)', 'n,m=int(input()),10**9+7\nprint((pow(10,n,m)-2*pow(9,n,m)+pow(8,n,m))%m)']
['Runtime Error', 'Accepted']
['s615754527', 's799560292']
[9064.0, 9112.0]
[25.0, 26.0]
[71, 71]
p02554
u389530753
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n=int(input())\na=(10**n-8**n)//(10**9+7)\nprint(a)\n', 'n=int(input())\na=(10**n+8**n-2*9**n)%(10**9+7)\nprint(a)\n']
['Wrong Answer', 'Accepted']
['s299852292', 's400452188']
[10612.0, 11080.0]
[2206.0, 398.0]
[50, 56]
p02554
u395313349
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['def main():\n MOD = int(1e9 + 7)\n n = int(input())\n print((pow(10,n,MOD) - 2*pow(9 , n , MOD)%MOD + pow(8 , n , MOD) + MOD)%MOD)\n\nif __namme__ == "__main__":\n main()', 'def main():\n MOD = int(1e9 + 7)\n n = int(input())\n print((pow(10,n,MOD) - 2*pow(9 , n , MOD)%MOD + pow(8 , n , MOD) + MOD)%MOD)\n \nif __name__ == "__main__":\n main()']
['Runtime Error', 'Accepted']
['s924450706', 's021992603']
[9100.0, 9100.0]
[29.0, 29.0]
[168, 168]
p02554
u404842368
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nans = pow(10,n,mod)\nans -= pow(9,n,mod)*2\nans += pow(8,n,mod)\nprint(ans%mod)\n', 'import numpy as np\n\nn = int(input())\nMOD = 1000000007\nans = 10**n - 9**n -9**n + 8**n\nans = ans % MOD\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s996953951', 's605864359']
[8948.0, 28728.0]
[26.0, 669.0]
[94, 113]
p02554
u405864101
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['\nNUM = 1000000007\n\nN = int(input())\n\nall_colab = pow(10, N)\nexcept_0or9_colab = pow(9, N)\nexcept_0and9_colab = pow(8, N)\n\nprint(all_colab - (2*except_0or9_colab + except_0and9_colab))', 'NUM = 1000000007\n\nN = int(input())\n\nall_colab = pow(10, N)\nexcept_0or9_colab = pow(9, N)\nexcept_0and9_colab = pow(8, N)\n\ninclude_0and9_colab = all_colab - (2*except_0or9_colab - except_0and9_colab)\n\nprint(include_0and9_colab % NUM)']
['Wrong Answer', 'Accepted']
['s053681501', 's285235514']
[11424.0, 11188.0]
[2206.0, 392.0]
[183, 231]
p02554
u414050834
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n=int(input())\nk=10**9+7\nans=(10**n)%k-(8**n)%k\nprint(ans%k)', 'n=int(input())\nk=10**9+7\nans=(10**n)%k+(8**n)%k-2*((9**n)%k)\nprint(ans%k)\n']
['Wrong Answer', 'Accepted']
['s624952673', 's618597407']
[10408.0, 10720.0]
[218.0, 395.0]
[60, 74]
p02554
u417309772
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n=int(input())\nP=1000000007\nprint((pow(10,n,P)-pow(8,n,P)) % P)', 'n=int(input())\nP=1000000007\nall = pow(10,n,P)\nno0 = pow(9,n,P)\nno9 = pow(9,n,P)\nneither = pow(8,n,P)\nprint((all - (no0 + no9 - neither)) % P)\n']
['Wrong Answer', 'Accepted']
['s349050605', 's016661625']
[9144.0, 9136.0]
[31.0, 32.0]
[63, 142]
p02554
u417365712
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nmod = 10**9 + 7\nprint(pow(10, n, mod) - 2*pow(9, n, mod) - pow(8, n, mod))', 'n = int(input())\nprint(pow(10, n, mod) - 2*pow(9, n, mod) - pow(9, n, mod))', 'n = int(input())\nmod = 10**9 + 7\nprint(pow(10, n, mod) - 2*pow(9, n, mod) - pow(9, n, mod))', 'n = int(input())\nmod = 10**9 + 7\nprint((pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, mod)) % mod)']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s423343547', 's650789126', 's680565009', 's354088489']
[9176.0, 9020.0, 9164.0, 9032.0]
[26.0, 27.0, 27.0, 28.0]
[91, 75, 91, 99]
p02554
u421310964
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N = int(input())\na = 2*(10^N-9^N)-(10^N-8^N)\n\nans = a % (10^9+7)\nprint(ans)\n', 'N = int(input())\n\na = 2*(10^N-9^N)-(10^N-8^N)\nans = a % (10^9+7)\nprint(ans)', 'N = int(input())\na = 2 * (10**(N) - 9**(N)) - (10**(N) - 8**(N)) \nans = a % (10**9+7)\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s695114791', 's804956445', 's728949751']
[9156.0, 9164.0, 11068.0]
[30.0, 29.0, 576.0]
[76, 75, 103]
p02554
u430395207
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\n\nzero_least = 1\n\nnot_09 = 1\n\nall_num = 1\nfor _ in range(n):\n zero_least = zero_least * 9\n not_09 = not_09 * 8 \n all_num = all_num * 10\n\nnine_least = zero_least\n\nresult = zero_least + not_09 + nine_least - all_num\n\nwaru =1\nfor i in range(9):\n waru = waru * 10\nwaru += 9\n\nprint(result%waru)', 'N = int(input())\n\nans =10 ** N - 9 ** N - 9 ** N + 8 ** N\nmod = 10 ** 9 + 7\nprint(ans % mod)']
['Wrong Answer', 'Accepted']
['s167550024', 's639629342']
[9372.0, 11100.0]
[2205.0, 569.0]
[390, 113]
p02554
u457326935
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['import numpy as np\n\nm = 1e9+7\n\nN = int(input())\n\nprint(type(N))\n\ndef culc_mod(a, b, md):\n """a^b (mod md)"""\n tmp = 1\n for _ in range(b):\n tmp *= a\n tmp = tmp%md\n return tmp\n \na = culc_mod(10, N, m)\nb = culc_mod(9, N, m)\nc = culc_mod(8, N, m)\n\nprint(int((a-2*b+c)%m))', 'import numpy as np\n\nm = 1e9+7\n\nN = int(input())\n\ndef culc_mod(a, b, md):\n """a^b (mod md)"""\n tmp = 1\n for _ in range(b):\n tmp *= a\n tmp = tmp%md\n return tmp\n \na = culc_mod(10, N, m)\nb = culc_mod(9, N, m)\nc = culc_mod(8, N, m)\n\nprint(int((a-2*b+c)%m))']
['Wrong Answer', 'Accepted']
['s143630028', 's916936352']
[27156.0, 27148.0]
[353.0, 353.0]
[296, 280]
p02554
u460745860
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['\ndef cal(N):\n for n in range(3,N+1):\n left = N - n\n right = n\n if left < 6:\n return 1\n else:\n return 1 + cal(left)\n\n if right < 6:\n return 1\n else:\n return 1 + cal(right)\n \n \nS = int(input())\n\nif S < 3:\n print(0)\n exit()\nelse:\n ans = cal(S)\n print((1+ans)%dekai())\n', 'N = int(input())\nmod = 10**9+7\nans = pow(10,N,mod) + pow(8,N,mod) - pow(9,N,mod) - pow(9,N,mod)\nprint(ans%mod)']
['Runtime Error', 'Accepted']
['s008020500', 's653738395']
[9664.0, 9108.0]
[35.0, 28.0]
[314, 110]
p02554
u463470469
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N = int(input())\na = (10**N*+8**N-2*(9**N))%((10**9)+7)\nprint(a)', 'N = int(input())\na = (10**N*+8**N-2*(9**N))%(10**9+7)\nprint(a)', 'N = int(input())\na = (10**N-8**N)%(10**9+7)\nprint(a)', 'N = int(input())\na = (10**N+8**N-2*(9**N))%((10**9)+7)\nprint(a)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s149040790', 's352551688', 's869720671', 's417753424']
[12588.0, 12444.0, 10448.0, 11076.0]
[408.0, 400.0, 217.0, 389.0]
[64, 62, 52, 63]
p02554
u477638578
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
["a=list(input())\nprint((a.count('9')+a.count('0'))%10**9+7)", '# #\n # author : samars_diary #\n \n# #\n\nimport sys, os.path, math\n\n#if(os.path.exists(\'input.txt\')):\n \n #sys.stdout = open(\'output.txt\',"w")\n\n\n\nmod = 1000000007\ndef i(): return sys.stdin.readline().strip()\ndef ii(): return int(sys.stdin.readline())\ndef li(): return list(sys.stdin.readline().strip())\ndef mii(): return map(int, sys.stdin.readline().split())\ndef lii(): return list(map(int, sys.stdin.readline().strip().split()))\n\n#print=sys.stdout.write\n\na=ii();print((pow(10,a,mod)+pow(8,a,mod)-2*pow(9,a,mod))%mod)\n']
['Wrong Answer', 'Accepted']
['s672891183', 's995672246']
[8992.0, 9080.0]
[31.0, 29.0]
[58, 681]
p02554
u477977638
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['import sys\n\ninput=sys.stdin.buffer.readline\n\n\n\n#from functools import lru_cache\n\ndef RD(): return sys.stdin.read()\n\n\ndef II(): return int(input())\n\n\ndef MI(): return map(int,input().split())\n\n\ndef MF(): return map(float,input().split())\n\n\ndef LI(): return list(map(int,input().split()))\n\n\ndef LF(): return list(map(float,input().split()))\n\n\ndef TI(): return tuple(map(int,input().split()))\n\n\n# rstrip().decode(\'utf-8\')\n\n\ndef main():\n\tn=II()\n\ta=pow(10,n,10**9+7)\n\tb=pow(9,n,10**9+7)\n\tc=pow(8,n,10**9+7)\n\tprint((a-2*b+c)%10**9+7)\n\t\n\nif __name__=="__main__":\n\tmain()\n', 'import sys\n\ninput=sys.stdin.buffer.readline\n\n\n\n#from functools import lru_cache\n\ndef RD(): return sys.stdin.read()\n\n\ndef II(): return int(input())\n\n\ndef MI(): return map(int,input().split())\n\n\ndef MF(): return map(float,input().split())\n\n\ndef LI(): return list(map(int,input().split()))\n\n\ndef LF(): return list(map(float,input().split()))\n\n\ndef TI(): return tuple(map(int,input().split()))\n\n\n# rstrip().decode(\'utf-8\')\n\n\ndef main():\n\tn=II()\n\ta=pow(10,n,10**9+7)\n\tb=pow(9,n,10**9+7)\n\tc=pow(8,n,10**9+7)\n\tprint((a-2*b+c)%(10**9+7))\n\t\n\nif __name__=="__main__":\n\tmain()\n']
['Wrong Answer', 'Accepted']
['s515682646', 's395105957']
[9268.0, 9216.0]
[32.0, 29.0]
[593, 595]
p02554
u505564549
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['import sys\ninput = sys.stdin.readline\nmod = int(1e9)+7\n\ndef solve():\n n=int(input())\n if n<3:\n print(0)\n return\n dp=[0]*2001\n dp[3]=dp[4]=dp[5]=1\n for i in range(6,n+1):\n dp[i]=(dp[i-1]+dp[i-3])%mod\n print(dp[n])\n\nif __name__=="__main__":\n solve()\n\n\n\n', 'import sys\nimport math\ninput = sys.stdin.readline\nmod = int(1e9)+7\n\ndef solve():\n n=int(input())\n ans = pow(10,n,mod)-(2*pow(9,n,mod)-pow(8,n,mod))\n print(ans%mod)\n\n \nif __name__=="__main__":\n solve()\n\n\n\n']
['Runtime Error', 'Accepted']
['s705226919', 's761783459']
[9204.0, 9144.0]
[30.0, 28.0]
[293, 219]
p02554
u524513264
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
["n = int(input())\n\nans = 0\nfor i in range(0, int('9'*n)+ 1):\n if len(str(i)) == n:\n if '9' in str(i) and '0' in str(i):\n ans += 1\n else:\n if '9' in str(i):\n ans += 1\n print(i)\n\nprint(ans % (10**9+7))\n", 's = int(input())\n\nn = 10 ** s - 9 ** s - 9 ** s + 8 ** s\n\nprint(n % (10 ** 9 + 7))\n']
['Wrong Answer', 'Accepted']
['s322049041', 's430423238']
[25332.0, 11112.0]
[2243.0, 580.0]
[244, 83]
p02554
u535110685
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\ncur = 8\nbot = n\nt = 0\nfor i in range(1, n):\n t += cur*(bot//i)\n cur *= 8\n bot *= n-i\n\nprint((10**n - 2*t - 8**n)%(10**9+7))', 'n = int(input())\na = 10**n-2*9**n+8**n\nprint(a%(10**9+7))']
['Wrong Answer', 'Accepted']
['s189771758', 's935349983']
[9368.0, 11004.0]
[2206.0, 393.0]
[149, 57]
p02554
u546853743
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n=int(input())\nA=1000000007\nx=10**n - 8**n\nprint(x%A)', 'n=int(input())\nA=1000000007\nx=10**n - 2*9**n + 8**n\nprint(x%A)']
['Wrong Answer', 'Accepted']
['s749703774', 's545649694']
[10548.0, 10996.0]
[216.0, 399.0]
[53, 62]
p02554
u550289743
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N = input()\nsatisfied_pattern = 10**N - (2*(9**N) - 8**N)\noutput = satisfied_pattern % (10**9+7)\nprint(output)\n', 'from sys import stdin\nN = stdin.readline().rstrip()\nN = int(N)\nsatisfied_pattern = 10**N - (2*(9**N) - 8**N)\noutput = satisfied_pattern % (10**9+7)\nprint(output)\n']
['Runtime Error', 'Accepted']
['s832719811', 's035787686']
[8948.0, 10928.0]
[24.0, 391.0]
[111, 162]
p02554
u559367141
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N = int(input())\na = 10**N - 8**N - 2*9**N\nb = a % (10**9 + 7)\nprint(b)', 'N = int(input())\na = 10**N - 8**N - 2*(9**N)\nb = a % (10**9 + 7)\nprint(b)\n', 'N = int(input())\na = 10**N + 8**N - 2*9**N\nb = a % (10**9 + 7)\nprint(b)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s156501610', 's689239493', 's770637812']
[11072.0, 11160.0, 10988.0]
[388.0, 402.0, 390.0]
[72, 75, 73]
p02554
u561294476
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['import math\ndef combinations_count(n, r):\n return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))\nN = int(input())\n\nall = 0\nfor i in range(2, N//2+1):\n basyo = combinations_count(N, i) \n\n zero_iti = 2 ** (3 * N - 2 * i - 1) \n zero_iti2 = 2 ** (N + 2 * i - 1) \n\n all += basyo * (zero_iti + zero_iti2)\n\nif S % 2 == 0: \n basyo = combinations_count(N, N)\n zero_iti = 2 ** (N - 1)\n all += basyo * zero_iti\n\nif S % 2 == 1: \n basyo = combinations_count(N, N)\n zero_iti = 2 ** (N - 1)\n all += basyo * zero_iti\n\n basyo = combinations_count(N, N - 1)\n zero_iti = 2 ** (N - 2)\n all += basyo * zero_iti\n\nprint(int(all % (10**9+7)))', ' N = int(input())\n print((10**N -9**N -9**N +8**N)% (10**9+7))\n', 'N = int(input())\nprint((10**N - 9**N - 9**N + 8**N) % (10**9+7))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s208366607', 's702768381', 's238736062']
[14908.0, 8944.0, 11192.0]
[2206.0, 24.0, 565.0]
[800, 65, 64]
p02554
u571718615
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['from sys import stdin\n\nN = int(stdin.readline().rstrip())\n\nif N == 1:\n print(0)\nelif N == 2:\n print(1)\nelse:\n print(\n (\n (10 ** N) - (9 ** N) - (9 ** N) + (8 ** N)\n ) % (10 ** 9 + 7))', 'from sys import stdin\n\nN = int(stdin.readline().rstrip())\n\nprint(\n (\n (10 ** N) - (9 ** N) - (9 ** N) + (8 ** N)\n ) % (10 ** 9 + 7))']
['Wrong Answer', 'Accepted']
['s920829810', 's912160581']
[10968.0, 10960.0]
[577.0, 580.0]
[217, 145]
p02554
u573536767
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['import numpy as np\n\nn = int(input())\n\n#print ((n*(n-1)*10**(n-2)) % (1E9+7))\n\ndiv=1000000007\nmod1=n % div\nmod2=(n-1) % div\n\nloop=(n-2)//10\namari=(n-2)%10\nmod3=1\nfor i in range(0,loop):\n mod3=(mod3*(10000000000 % div) ) % div\nmod3=mod3*(10**amari % div)\n\nprint (loop, amari)\nprint((((mod1*mod2) % div)*mod3)%div)', 'import numpy as np\n\nn = int(input())\n\ndiv=1000000007\n\nloop=(n)//10\namari=(n)%10\n\nmod1=1\nmod2=1\nmod3=1\nfor i in range(0,loop):\n mod1=(mod1*(10**10 % div) ) % div\n mod2=(mod2*(9**10 % div) ) % div\n mod3=(mod3*(8**10 % div) ) % div\nmod1=mod1*(10**amari % div)\nmod2=mod2*(9**amari % div)\nmod3=mod3*(8**amari % div)\n\n#print (loop, amari)\n#print (mod1, mod2, mod3)\nprint((((mod1-mod2*2))+mod3) % div)\n']
['Wrong Answer', 'Accepted']
['s777070475', 's270076835']
[27148.0, 26856.0]
[153.0, 181.0]
[312, 398]
p02554
u583276018
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n=int(input())\nprint((10**n-9**n*2+8**n)%(1e9+7))', 'n=int(input())\nprint((10**n-9**n*2+8**n)%(10**9+7))']
['Runtime Error', 'Accepted']
['s501858999', 's585641078']
[11176.0, 11024.0]
[387.0, 388.0]
[49, 51]
p02554
u590241855
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\n\nmod = int(1e9+7)\n\nans = n**10 - n**9 * 2 - n**8\nans %= mod\n\nprint(ans)\n', 'n = int(input())\n\nmod = 10**9 + 7\n\nans = pow(10, n, mod) - pow(9, n, mod) * 2 + pow(8, n, mod)\nans %= mod\n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s780814280', 's668246699']
[9104.0, 9156.0]
[27.0, 37.0]
[89, 118]
p02554
u595893956
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['def bekijou(a,x):\n MOD = 1000000009\n ret = 1\n for _ in range(x):\n ret *= a\n ret %= MOD\n \nn=int(input())\nret = 0\nsum = bekijou(9,n)\nMOD = 1000000009\nret = (2 * sum) % MOD\nret += MOD - bekijou(8,n)\nret = bekijou(10,n) + MOD - ret\nprint(ret)', 'def bekijou(a,x):\n MOD = 1000000007\n ret = 1\n for _ in range(x):\n ret *= a\n ret %= MOD\n return ret\n \nn=int(input())\nMOD = 1000000007\nret = (bekijou(10,n)+MOD-((2*bekijou(9,n)) % MOD)+bekijou(8,n))%MOD\nprint(ret)']
['Runtime Error', 'Accepted']
['s213791717', 's250386827']
[9068.0, 9100.0]
[128.0, 324.0]
[250, 224]
p02554
u608726540
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n = int(input())\nans = (10**n)%-2*(9**n)+8**n\nprint(ans%(10**9+7))', 'n = int(input())\nans = (10**n)%-2*(9**n)+8**n\nprint(ans%(10**9+7))\n', 'n = int(input())\nans = (10**n)-2*(9**n)+8**n\nprint(ans%(10**9+7))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s088388689', 's879449657', 's960850189']
[10516.0, 10572.0, 10932.0]
[389.0, 391.0, 398.0]
[66, 67, 66]
p02554
u611090896
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['N = int(input())\nmod = 10** + 7\nif N == 1:\n print(0)\nelse:\n ans = N*10**(n-2)\n print(ans%mod)', 'n = int(input())\nmod = 10**9+7\na = 10**n-9**n-9**n+8**n\nprint(a%mod)']
['Runtime Error', 'Accepted']
['s765885338', 's340130819']
[9152.0, 11028.0]
[23.0, 573.0]
[96, 68]
p02554
u627886394
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['n=input()\nprint((10**n-(2*9**n-8**n))%(10**9+7))', 'n=int(input())\nprint((10**n-(2*9**n-8**n))%(10**9+7))']
['Runtime Error', 'Accepted']
['s149527975', 's739626611']
[8904.0, 11040.0]
[25.0, 388.0]
[48, 53]
p02554
u635252313
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['import math\n\nN = int(input())\nhoge = 10**9+7\nif N == 1:\n print(0)\nelse:\n a = math.factorial(N) / math.factorial(N-2)\n b = 10**(N-2)\n print(a*b%hoge)', 'n = int(input())\nmod = (10**9)+7\nans = (10**n) - 2*(9**n) + 8**n\nprint(ans%mod)']
['Runtime Error', 'Accepted']
['s762059480', 's515625008']
[14964.0, 10900.0]
[2206.0, 388.0]
[160, 79]
p02554
u636290142
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['import math\n\n\ndef permutations_count(n, r):\n return math.factorial(n) // math.factorial(n - r)\n\n\nN = int(input())\n\nif N < 2:\n print(0)\n exit()\n\nans = (permutations_count(N, 2) * (10 ** (N-2)) -\n permutations_count(N, 2)) % (10**9 + 7)\n\nprint(ans)\n', 'N = int(input())\n\nans = (10**N - 9**N - 9**N + 8**N) % (10**9 + 7)\n\nprint(ans)\n\n']
['Wrong Answer', 'Accepted']
['s783189758', 's949059692']
[14868.0, 10968.0]
[2206.0, 582.0]
[262, 80]
p02554
u636582303
2,000
1,048,576
How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions? * 0 \leq A_i \leq 9 * There exists some i such that A_i=0 holds. * There exists some i such that A_i=9 holds. The answer can be very large, so output it modulo 10^9 + 7.
['mod = 10 ** 9 + 7\n\nN = int(input())\n\nresult = 0\n\nten = pow(10, N, mod)\nnine = pow(9, N, mod)\neight = pow(8, N, mod)\n\nresult = (ten - 2 * nine + eight) % mode\n\nprint(result)', 'mod = 10 ** 9 + 7\n\nN = int(input())\n\nresult = 0\n\nten = pow(10, N, mod)\nnine = pow(9, N, mod)\neight = pow(8, N, mod)\n\nresult = (ten - 2 * nine + eight) % mod\n\nprint(result)']
['Runtime Error', 'Accepted']
['s305040778', 's075351968']
[9080.0, 9084.0]
[25.0, 34.0]
[172, 171]