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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03241 | u735069283 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import sys\ninput= sys.stdin.readline\n\nN,M = map(int,input().split())\ng=M//N\nfor i in range(g):\n if M%(N+i)==0:\n print(M//(N+i))\n exit()', 'N,M = map(int,input().split())\ng=M//N\nfor i in range(g):\n if M%g==0:\n print(g)\n exit()', 'import sys\ninput= sys.sdtin.readline\n\nN,M = map(int,input()... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s015963102', 's610071239', 's738545433', 's116106157'] | [3064.0, 2940.0, 2940.0, 3060.0] | [48.0, 2104.0, 17.0, 77.0] | [194, 145, 189, 237] |
p03241 | u752767312 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\n\nN,M = map(int,input().split())\n\nans = 1\nfor i in range(1,int(math.sqrt(M)+1)+1):\n if M % i != 0:\n continue\n B = M / i\n \n if (A * N <= M):\n ans = max(ans,A)\n if (B * N <= M):\n ans = max(ans,B)\n\nprint(ans)\n ', 'import math\n \nN,M = map(int,input().split())\n \nans = 1\nfor i... | ['Runtime Error', 'Accepted'] | ['s210499638', 's315700478'] | [3060.0, 3064.0] | [17.0, 21.0] | [258, 347] |
p03241 | u754022296 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n, m = map(int, input().split())\nk = m//n\nans = 0\nfor i in range(1, int(m**0.5)+1):\n if m%i == 0:\n if i <= k:\n if i <= k:\n ans = max(ans, i)\n if m//i <= k:\n ans = max(ans, m//i)\nprint(ans)', 'n, m = map(int, input().split())\nk = m//n\nans = 0\nfor i in range(1, int(m**0.5)+1):\n if m... | ['Runtime Error', 'Accepted'] | ['s598920437', 's150224227'] | [3064.0, 3060.0] | [17.0, 21.0] | [210, 193] |
p03241 | u761989513 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n, m = map(int, input().split())\nfor i in range(n, int(m ** .5) + 1):\n if m % i == 0:\n print(m // i)\n exit()', 'def make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n div... | ['Wrong Answer', 'Accepted'] | ['s879144460', 's084897490'] | [2940.0, 3060.0] | [19.0, 20.0] | [125, 346] |
p03241 | u768896740 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['def primes(n):\n is_prime = [True] * (n + 1)\n is_prime[0] = False\n is_prime[1] = False\n for i in range(2, int(n**0.5) + 1):\n if not is_prime[i]:\n continue\n for j in range(i * 2, n + 1, i):\n is_prime[j] = False\n return [i for i in range(n + 1) if is_prime[i]]\... | ['Time Limit Exceeded', 'Accepted'] | ['s299203480', 's847006283'] | [107484.0, 3064.0] | [2109.0, 20.0] | [702, 391] |
p03241 | u774160580 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = map(int, input().split())\ndiv = []\nfor i in range(1, M + 1):\n if i * i > M:\n break\n if M % i == 0:\n div.append(i)\n if M % i == 0 and i != M // i:\n div.append(M // i)\ndiv.sort()\ndiv.reverse()\nprint(div)\nfor i in div:\n if M // i >= N:\n print(i)\n break... | ['Wrong Answer', 'Accepted'] | ['s199212170', 's395341050'] | [3064.0, 2940.0] | [29.0, 28.0] | [304, 293] |
p03241 | u781262926 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['from math import sqrt\nfrom numba import njit\n@njit\ndef divisors(n):\n divisors = []\n for i in range(1, int(sqrt(n))+1):\n q, r = divmod(n, i)\n if r == 0:\n divisors.append(i)\n if i != q:\n divisors.append(q)\n divisors.sort()\n return divisors\n\nn,... | ['Wrong Answer', 'Accepted'] | ['s569297921', 's658612985'] | [123236.0, 9204.0] | [1966.0, 29.0] | [414, 383] |
p03241 | u784022244 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N,M=map(int, input().split())\n\nif M%N==0:\n print(M//N)', 'N,M=map(int, input().split())\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return... | ['Wrong Answer', 'Accepted'] | ['s777423714', 's611900238'] | [2940.0, 3188.0] | [17.0, 20.0] | [55, 388] |
p03241 | u785989355 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N,M = list(map(int,input().split()))\n\nif N==1:\n print(M)\nelse:\n ans = 1\n for i in range(1,10**5):\n if i*i>M:\n break\n if M%i==0:\n j = max(i.M//i)\n if j>=N:\n ans = max(j,ans)\n\n print(ans)', 'N,M = list(map(int,input().split()))\n\ni... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s098241283', 's160290387', 's460090761'] | [3060.0, 3060.0, 3060.0] | [17.0, 25.0, 25.0] | [259, 259, 328] |
p03241 | u790877102 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\n\nn,m = map(int,input().split())\n\nx=0\n\ns = []\nfor i in range(math.floor(math.sqrt(m)))\n\tif m%i==0:\n\t\ts.append(i)\n\n\n\nfor i in s\n\tif m%(i+1)==0 and m//(i+1)>n-1:\n\t\tx=max(x,i+1)\nprint(x)\n\n\n\n', 'import math\n\nn,m = map(int,input().split())\n\nx=0\n\ns = []\nfor i in range(math.sqrt(m... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s254342857', 's317059405', 's358769558', 's768821371', 's869393506', 's198519230'] | [2940.0, 3060.0, 3064.0, 2940.0, 2940.0, 3060.0] | [17.0, 18.0, 22.0, 17.0, 22.0, 22.0] | [198, 190, 195, 186, 134, 221] |
p03241 | u790905630 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import sys\nsys.setrecursionlimit(10**10)\n\ndef search_max_gcd(M, possible):\n if possible == 1:\n return 1\n elif (M % possible) == 0:\n return possible\n else:\n return search_max_gcd(M, possible-1)\n\ndef main():\n N, M = map(int, input().split())\n first_possible = M//N\n p... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s314860773', 's334794323', 's647398388'] | [2940.0, 2940.0, 3060.0] | [18.0, 17.0, 20.0] | [351, 362, 283] |
p03241 | u795630164 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\nN, M = map(int, input().split())\nif N == 1:\n print(M)\n exit()\n\nn = 0\nfor i in range(1, int(math.sqrt(M))+1):\n if M % i == 0:\n n = max(i, n)\n if i >= N:\n n = max(M//i, n)\n if M < i * N:\n break\n\nprint(n)\n', 'import math\nN, M = map(int, input().split())\n\... | ['Wrong Answer', 'Accepted'] | ['s170906551', 's358183642'] | [3060.0, 3060.0] | [34.0, 25.0] | [250, 224] |
p03241 | u797740860 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\n\nn = 100000\nm = 1000000000\npq_max = 0\n\nfor p in range(1, int(math.sqrt(m)) + 1):\n if m % p == 0:\n q = m // p\n \n if p >= n and q > pq_max:\n pq_max = q\n \n if q >= n and p > pq_max:\n pq_max = p\n \nprint(pq_max)', 'import ma... | ['Wrong Answer', 'Accepted'] | ['s239157756', 's791145825'] | [3060.0, 3060.0] | [22.0, 21.0] | [289, 307] |
p03241 | u802772880 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m=map(int,input().split())\nans=1\nfor i in range(1,m**0.5+1):\n if m%i==0:\n if m/i>=n:\n ans=max(ans,i)\n elif i>=n:\n ans=max(ans,m//i)\nprint(ans)', 'n,m=map(int,input().split())\nans=1\nfor i in range(1,int(m**0.5)+1):\n if m%i==0:\n if m/i>=n:\n ans=... | ['Runtime Error', 'Accepted'] | ['s950146746', 's379413807'] | [3060.0, 3060.0] | [17.0, 21.0] | [183, 186] |
p03241 | u807772568 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math;a = list(map(int,input().split()));b = a[1]//a[0];c = [];for i in range(1,int(math.sqrt(a[1]))+1):if a[1]%i==0 and i<=b:if a[1] // i <= b:c.append(a[1]//i);else:c.append(i);c.sort(reverse=True);print(c[0])', '¥import math\na = list(map(int,input().split()))\nb = a[1]//a[0]\nc = []\nfor i in range(1,int(ma... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s527149509', 's917560778', 's171552031'] | [3064.0, 3060.0, 3060.0] | [17.0, 18.0, 22.0] | [217, 267, 265] |
p03241 | u820351940 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n, m = map(int, input().split())\nif n == 1:\n print(m)\n exit()\n', 'n, m = map(int, input().split())\nvalues = []\n\ndef pfac(n):\n values = [1, n]\n for i in range(2, int(n ** 0.5) + 1):\n if n % i == 0:\n values.append(i)\n values.append(n // i)\n return values\n\n\nfor... | ['Wrong Answer', 'Accepted'] | ['s367989733', 's459216265'] | [2940.0, 3060.0] | [17.0, 20.0] | [68, 323] |
p03241 | u839188633 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n, m = map(int, input().split())\nfor i in range(int(m/n), int(n**.5), -1):\n if not m % i:\n print(m//i)\n exit()\nfor i in range(int(min((m / n), n**.5)), 0, -1):\n if not m % i:\n print(i)\n break', 'n, m = map(int, input().split())\nfor i in range(-int(-m/n), -int(-n**.5), -1):\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s256310924', 's812433422', 's897139496'] | [3060.0, 3188.0, 3060.0] | [2103.0, 2104.0, 22.0] | [225, 228, 240] |
p03241 | u844789719 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\nn,m=(int(i) for i in input().split())\np = min(math.sqrt(m),int(m/n))\nwhile p>1:\n if m%p==0 and m>=n*p:\n break\n p-=1\nprint(p)', 'n,m=(int(i) for i in input().split())\np = int(m**(1/2))\ndivisors = []\nfor i in range(1,p+1):\n if m%i == 0:\n if n*i<=m:\n divisors.ap... | ['Wrong Answer', 'Accepted'] | ['s000845378', 's596384478'] | [2940.0, 3060.0] | [31.0, 21.0] | [149, 235] |
p03241 | u845333844 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m=map(int, input().split())\n\nk=[]\n\nfor i in range(m):\n if (m%i==0) and (m//i <= n):\n k.append(i)\n \nprint(max(k)) \n\n \n\n\n\n', 'import math\nn,m=map(int, input().split())\n\nk=[]\n\nfor i in range(m):\n if (m%i==0) and (m//i <= n):\n k.append(i)\n \nprint(max(k)) \n\n \n\n\n\n', ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s490889477', 's559593634', 's863562852', 's611753158'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 20.0, 21.0] | [135, 147, 168, 304] |
p03241 | u852038767 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\n\nN,M = map(int,input().split())\nA = []\nn = 0\nif N == 1:\n print(M)\nelse:\n ans = 1\n for i in range(1, int(math.sqrt(M))):\n if (M % i == 0):\n A.append(i)\n A.append(int(M / A[2*n]))\n n += 1\n print(A)\n for k in range(len(A)):\n if A[-... | ['Wrong Answer', 'Accepted'] | ['s792633052', 's516957887'] | [3064.0, 3060.0] | [24.0, 22.0] | [360, 314] |
p03241 | u855985627 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ["n,m=(int(i) for i in input().split(' '))\ni=m\nif m=2147483647:\n print(1)\n exit()\nwhile True:\n if i==1:\n print(i)\n break\n if m%i==0 and m//i>=n:\n print(i)\n break\n else:\n i-=1\n", "import random\n\ndef is_prime(q,k=10):\n if q == 2: return True\n if q < 2 or q&1 == 0: return False\... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s067385058', 's068516274', 's110530905', 's113976088', 's249904822', 's255179725', 's294057649', 's327803609', 's392515314', 's409280773', 's461677975', 's606067779', 's635151807', 's651194991', 's851273036', 's912432210', 's918294558', 's924000293', 's507995414'] | [2940.0, 3444.0, 2940.0, 2940.0, 3064.0, 3060.0, 2940.0, 3444.0, 2940.0, 3060.0, 3064.0, 2940.0, 3060.0, 2940.0, 3444.0, 3064.0, 4200.0, 3064.0, 3444.0] | [17.0, 57.0, 17.0, 50.0, 17.0, 2104.0, 17.0, 2104.0, 17.0, 17.0, 17.0, 17.0, 2108.0, 17.0, 2104.0, 17.0, 2104.0, 2103.0, 649.0] | [193, 666, 124, 148, 778, 273, 375, 714, 49, 146, 685, 8, 295, 156, 680, 742, 629, 378, 684] |
p03241 | u856232850 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m = map(int,input().split())\na = int((m**0.5)//1)\nb = 0\n\nfor i in range(1,a+1):\n if m % i == 0:\n if (m//i)%n == 0:\n b = i\nprint(b)', 'n,m = map(int,input().split())\na = int((m**0.5)//1)\nb = 0\nif n == 1:\n print(m)\nelse:\n for i in range(1,a+1):\n if m % i == 0:\n ... | ['Wrong Answer', 'Accepted'] | ['s633444756', 's354305804'] | [3060.0, 3188.0] | [21.0, 21.0] | [153, 263] |
p03241 | u857330600 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m=map(int,input().split())\nr=m//n\nfor i in range(n,r):\n if m%i==0:\n print(m//i)\n break', 'n,m=map(int,input().split())\nr=m//n\nif r>=10**7:\n for i in range(n,r):\n if m%i==0:\n print(m//i)\n break\nelse:\n for i in range(r):\n if m%(r-i)==0 and m//(r-i)>=n:\n print(r-i)\n b... | ['Wrong Answer', 'Accepted'] | ['s397993292', 's178808547'] | [2940.0, 3060.0] | [37.0, 47.0] | [95, 207] |
p03241 | u857759499 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m = map(int,input().split())\na = m//n\ndi = []\nfor i in range(1, min(a+1,int(m**0.5)+1)):\n if m % i == 0:\n di.append(i)\n if i != m // i and a >= m // i:\n di.append(m//i)\ndi.sort()\nprint(di,di[-1])', 'n,m = map(int,input().split())\na = m//n\ndi = []\nfor i in range(1, min(a+1,int(m**0.5)+1)):\n... | ['Wrong Answer', 'Accepted'] | ['s688548961', 's469939905'] | [9436.0, 9404.0] | [30.0, 38.0] | [210, 207] |
p03241 | u863076295 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N,M = map(int,input().split())\nfor i in range(M//N,0,-1):\n if M%i==0: break\n print(i)', 'N,M = map(int,input().split())\n\nfor i in range(M//N,0,-1):\n if m%i!=0: break\n else (M-N*i)%i==0:\n ret = i\n print(ret)\n break', 'N,M = map(int,input().split())\nfor i in range(M//N,0,-1):... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s097636393', 's334951777', 's815976302', 's905376251', 's671626081'] | [23268.0, 3064.0, 2940.0, 2940.0, 2940.0] | [2103.0, 22.0, 17.0, 17.0, 1837.0] | [91, 151, 119, 119, 123] |
p03241 | u867848444 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m=map(int,input().split())\n\nnum=m//n\nans=1\nfor i in range(int(m**0.5),2,-1):\n if m%i==0:\n Num=m//i\n if Num <= num and ans < Num:\n ans = Num\n\n if i<=num and ans<i:\n ans=i\n\nprint(ans)', 'n,m=map(int,input().split())\n\nnum=m//n\nans=1\nfor i in range(int(m**0.5),2,-1... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s148878201', 's157406829', 's415484489', 's874625381'] | [3060.0, 3060.0, 5048.0, 9436.0] | [24.0, 22.0, 35.0, 35.0] | [221, 222, 153, 225] |
p03241 | u883048396 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import itertools\n\niN,iM = [int(_) for _ in input().split()]\n\n\nif iM % iN == 0:\n print(iM // iN)\nelse:\n iUlim = iM//iN\n aRet = [1]\n iF = 2\n iterIncrements = itertools.chain([1,2,2],itertools.cycle([4,2,4,2,4,6,2,6]))\n for i in iterIncrements:\n if iUlim < iF:\n break\n ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s298709882', 's497831841', 's875419161', 's334041104'] | [3064.0, 3060.0, 3060.0, 3064.0] | [2104.0, 2103.0, 18.0, 20.0] | [391, 170, 240, 801] |
p03241 | u888337853 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ["import sys\n\n# import re\nimport math\nimport collections\n\nimport bisect\nimport itertools\nimport fractions\n# import functools\nimport copy\nimport heapq\nimport decimal\n# import statistics\nimport queue\n\nsys.setrecursionlimit(10000001)\nINF = 10 ** 16\nMOD = 10 ** 9 + 7\n\nni = lambda: int(sys.stdin.readline... | ['Wrong Answer', 'Accepted'] | ['s268841179', 's569974822'] | [5564.0, 5092.0] | [49.0, 40.0] | [947, 953] |
p03241 | u891217808 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n, m = map(int, input().split())\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n divisors.sort()\n return divisors\ndiv = make_divisors(n)\nfor i in div[... | ['Wrong Answer', 'Accepted'] | ['s188880863', 's671766234'] | [3060.0, 3188.0] | [18.0, 20.0] | [363, 363] |
p03241 | u896741788 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m=map(int,input().split())\nans=1\nfor i in range(2,int(m**(1/2))+1):\n if m%i==0:\n if i>=n:ans=max(m//i*(n//i),ans)\n if m//i>=n:\n ans=max(i*(m//i//n),ans)\nprint(ans)', 'n,m=map(int,input().split())\nans=1\nfor i in range(1,int(m**(1/2))+1):\n if m%i==0:\n if i>=n:ans=max(m... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s005166155', 's981695723', 's625694504'] | [3060.0, 2940.0, 3188.0] | [21.0, 17.0, 21.0] | [193, 177, 176] |
p03241 | u899975427 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m = map(int,input().split())\nans = 0\nfor i in range(1,int(n**0.5)+1):\n if m % i == 0 and m // i >= n:\n ans = max(ans,i)\n if m % i == 0 and i >= n:\n ans = max(ans,m//i)\nprint(ans)', 'n,m = map(int,input().split())\nans = 1\nif m % n == 0:\n print(m//n)\n exit()\nelse:\n for i in range(2,int(n**0.5)... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s045549121', 's755248421', 's863689725', 's706775143'] | [3060.0, 2940.0, 3060.0, 3060.0] | [18.0, 18.0, 17.0, 25.0] | [188, 177, 242, 188] |
p03241 | u903460784 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import fraction\n# import math\nn,m=map(int,input().split())\n\n# (m-n+n-1)!/((m-n)!(n-1)!)\nif m%n==0:\n print(m//n)\nelse:\n print(fraction.gcd(m//n,m%n))\n # print(math.gcd(m//n,m%n))\n', '\n\nn,m=map(int,input().split())\n\ndivisors=[]\nfor i in range(1,int(n**0.5)+1):\n if n%i==0:\n divisors.a... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s344860726', 's431778448', 's490796690'] | [2940.0, 2940.0, 3060.0] | [18.0, 18.0, 22.0] | [271, 373, 392] |
p03241 | u903596281 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N,M=map(int,input().split())\nif M%N==0:\n print(M//N)\nelse:\n s=M//N\n if s<100000:\n ans=1\n while s!=1:\n if M%s==0:\n ans=s\n break\n s-=1\n print(ans)\n else:\n rM=M**(1/2)\n s=N\n ans=1\n while s<=rM:\n if M%s==0:\n ans=M//s\n break\n s+=... | ['Runtime Error', 'Accepted'] | ['s786926905', 's446220877'] | [3060.0, 3316.0] | [18.0, 25.0] | [407, 415] |
p03241 | u905582793 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N,M=map(int,input().split())\nd=[]\nfor i in range(1,int(M**0.5+1)):\n if M%i == 0:\n d.extend(i,M//i)\nd=list(set(d)).sort()\nfor x in d:\n if x>=N:\n print(M//x)\n break\n', 'N,M=map(int,input().split())\nd=[]\nfor i in range(1,int(M**0.5+1)):\n if M%i == 0:\n d. append(i)\n d.append(M//i)\ndd=lis... | ['Runtime Error', 'Accepted'] | ['s923322702', 's111636642'] | [2940.0, 3060.0] | [18.0, 21.0] | [174, 193] |
p03241 | u906428167 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m = map(int,input().split())\n\nans = 1\n\nfor i in range(1,int(m**0.5)+1):\n if m % i == 0 and m /n >= i:\n ans = max(ans,i)\n if i != n // i and m/n >= (n//i):\n ans = max(ans,n // i)\n\nprint(ans)\n\n\n', 'n,m = map(int,input().split())\n\nans = 1\n\nfor i in range(1,int(m**0.5)+1):\n... | ['Wrong Answer', 'Accepted'] | ['s066319634', 's087037911'] | [3060.0, 2940.0] | [21.0, 21.0] | [222, 220] |
p03241 | u913110564 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\nn, m = map(long, input().split())\nkotae=1\n\nfor i in range(1,long(math.sqrt(m))+1):\n\tif m%i==0:\n\t\tif i*n<=m:\n\t\t\tkotae=max(kotae, i)\n\t\tif (m/i)*n<=m:\n\t\t\tkotae=max(kotae, m/i)\nprint(kotae)', 'import math\nn, m = map(int, input().split())\nkotae=1\n\nfor i in range(1,int(math.sqrt(m))+1):... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s020593019', 's035048966', 's065886684', 's134923848', 's255811021', 's377926091', 's521548322', 's560478708', 's940088395'] | [3060.0, 2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 3060.0, 3060.0] | [17.0, 18.0, 17.0, 18.0, 17.0, 17.0, 17.0, 21.0, 21.0] | [197, 199, 158, 202, 113, 104, 158, 180, 158] |
p03241 | u919633157 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['# 2019/08/01\n\nfrom fractions import gcd\n\nn,m=map(int,input().split())\n\ndef divisors(n,m):\n div=[]\n end=min(m//n,int(pow(m,0.5)))\n for i in range(2,end+1):\n if m%i==0:\n div.append(i)\n return div\n\nres=divisors(n,m)\nprint(res[-1])\n\n', '# 2019/08/01\n\nn,m=map(int,input().sp... | ['Runtime Error', 'Accepted'] | ['s042806513', 's791713077'] | [5176.0, 3064.0] | [38.0, 20.0] | [259, 323] |
p03241 | u920299620 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import sys\nN,M=map(int,input().split())\ni=N\nif(i%2==1):\n if(M%i==0):\n print(M//i)\n sys.exit(0)\n M+=1\nif(M%i==0):\n print(M//i)\n sys.exit(0)\ni+=1\n\n \nwhile(i*2 <=M):\n if(M%i==0):\n break\n i+=2\nif(i*2>M):\n i=M\nprint(M//i)', 'import sys\nN,M=map(int,input().s... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s376103079', 's516946691', 's860092683', 's544222833'] | [3064.0, 3064.0, 2940.0, 3188.0] | [2103.0, 2104.0, 26.0, 51.0] | [261, 260, 120, 237] |
p03241 | u922901775 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ["#!/usr/bin/env python3\nimport sys\n\ndef factoring(n: int):\n factors = []\n p = 1\n while p * p <= n:\n if n % p == 0:\n factors.append(p)\n if n != p * p:\n factors.append(n // p)\n p += 1\n return factors\n\ndef solve(N: int, M: int):\n if N == 1:\... | ['Wrong Answer', 'Accepted'] | ['s135983501', 's685263050'] | [3064.0, 3064.0] | [22.0, 22.0] | [937, 924] |
p03241 | u930705402 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import bisect\ndef factor(N):\n arr=[]\n for i in range(1,int(N**0.5)+1):\n if(N%i==0):\n arr.append(i)\n if(N//i!=i):\n arr.append(N//i)\n return arr\n\nN,M=map(int,input().split())\nli=sorted(factor(M))\nres=1\nfor i in li:\n if(i>M//N):\n break\n if(M//i>=N... | ['Wrong Answer', 'Accepted'] | ['s154560015', 's334263977'] | [4584.0, 3064.0] | [37.0, 21.0] | [329, 337] |
p03241 | u934246119 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math\nn, m = map(int, input().split())\nroot_m = int(math.sqrt(m) + 1)\nans = 1\nfor a in range(1, root_m):\n # print(a, ans)\n b = m // a\n if a * n <= m:\n ans = max(ans, a)\n if b * n <= m:\n ans = max(ans, b)\nprint(ans)\n', 'import math\nn, m = map(int, input().split())\nroot_m =... | ['Wrong Answer', 'Accepted'] | ['s628684155', 's782430409'] | [3060.0, 3060.0] | [42.0, 21.0] | [247, 281] |
p03241 | u936985471 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m=map(int,input().split())\nans=0\nimport math\nfor i in range(1,min(m//n+1,int(math.sqrt(m))+1):\n if m%i==0:\n ans=max(i,ans)\nprint(ans)\n', 'import sys\nreadline = sys.stdin.readline\n\nN,M = map(int,readline().split())\n\n\n\nans = 0\nfor i in range(1,int(M ** 0.5) + 1):\n if M % i == 0:\n p = M // i\n... | ['Runtime Error', 'Accepted'] | ['s809652140', 's352486351'] | [2940.0, 3060.0] | [18.0, 21.0] | [140, 328] |
p03241 | u940102677 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m = map(int,input())\nwhile n <= m:\n if m%n == 0:\n print(m%n)\n break\n n += 1', 'n,m = map(int,input())\nwhile n <= m:\n if m%n == 0:\n print(m%n)\n n += 1\nbreak', 'n,m = map(int, input().split())\nif n*n <= m:\n k = n\n while k*k <= m:\n if m%k == 0:\n print(m//k)\n exit()\n k +=... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s498666632', 's980679841', 's105390259'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 24.0] | [85, 81, 213] |
p03241 | u941753895 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy\n\nsys.setrecursionlimit(10**7)\ninf=10**20\nmod=10**9+7\ndd=[(-1,0),(0,1),(1,0),(0,-1)]\nddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]\n\ndef LI(): return [int(x) for x in sys.stdin.readline().split()]\ndef LF(): return [float(x) f... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s000857217', 's502029705', 's156906044'] | [5168.0, 5168.0, 5424.0] | [40.0, 40.0, 44.0] | [745, 745, 774] |
p03241 | u945181840 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = map(int, input().split())\n\nfor i in reversed(range(1, N + 1)):\n if M % i == 0:\n N = i\n break\n\nprint(M // N)', 'from bisect import bisect_right\nN, M = map(int, input().split())\n\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n... | ['Wrong Answer', 'Accepted'] | ['s062163001', 's941163925'] | [2940.0, 3060.0] | [28.0, 21.0] | [131, 387] |
p03241 | u952708174 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = [int(i) for i in input().split()]\nif N==M:\n print(1)\nelse:\n a = 0\n for i in range(2,M):\n if M%i==0:\n a = i\n print(a)', 'def d_partition(N, M):\n if N == 1:\n return M \n\n def divisor_list(n):\n \n ret = []\n for k in range(1, int(n**0.5) + 1):\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s068169301', 's536480009', 's727077913'] | [2940.0, 3064.0, 3060.0] | [2104.0, 17.0, 21.0] | [135, 627, 509] |
p03241 | u969190727 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n,m=map(int,input().split())\nans=1\nfor i in range(1,m**0.5+1):\n if m%i==0:\n if i>=n:\n ans=max(ans,m//i)\n elif m//i>=n:\n ans=max(ans,i)\nprint(ans)', 'n,m=map(int,input().split())\nans=1\nfor i in range(1,int(m**0.5)+1):\n if m%i==0:\n if i>=n:\n ans=max(ans,m//i)\n elif m//i>=n:\n ... | ['Runtime Error', 'Accepted'] | ['s774745751', 's750370040'] | [3064.0, 3060.0] | [26.0, 21.0] | [162, 167] |
p03241 | u970197315 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['# AGC112 D - Partition\nfrom math import floor\nfrom fractions import gcd\nn,m=map(int,input().split())\nif m%n==0:\n print(m//n)\n exit()\n\nn_max=floor(m/n)\nans=0\nfor i in range(n_max,0,-1):\n if i%n==0:\n q=m//i\n r=m%i\n ans=gcd(q,q+r)\n print(ans)\n exit()\n', '# AGC... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s228988397', 's319261394', 's805759730', 's382019705'] | [5044.0, 3064.0, 5688.0, 3064.0] | [37.0, 23.0, 53.0, 20.0] | [292, 432, 741, 354] |
p03241 | u970308980 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = map(int, input().split())\n\nfor i in reversed(range(1, int(N**0.5)+1)):\n if M % i == 0:\n if N * i <= M:\n print(i)\n exit()\n', 'N, M = map(int, input().split())\n\nans = 1\nfor i in range(1, int(M**0.5)+1):\n if M % i != 0:\n continue\n\n j = M // i\n if i * ... | ['Wrong Answer', 'Accepted'] | ['s539936003', 's708501324'] | [2940.0, 3060.0] | [21.0, 22.0] | [160, 230] |
p03241 | u977389981 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['n, m = map(int, input().split())\na = m // n\nans = 0\n\nfor i in range(1, a + 1):\n if m % i == 0:\n if (m // i) > i and (m // i) <= a:\n ans = m // i\n break\n \nprint(ans)', 'N, M = map(int,input().split())\na = M // N\nx = 1\n\nfor i in range(1, a + 1):\n if M % i == 0:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s031393290', 's973186826', 's224489839'] | [3060.0, 2940.0, 3064.0] | [38.0, 2104.0, 21.0] | [201, 118, 302] |
p03241 | u978313283 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N,M=map(int,input().split())\na=M//N\nx=0\n for i in reversed(range(2,a+1)):\n if M%i==0:\n x=i\n break\nprint(x)', 'N,M=map(int,input().split())\na=M//N\nx=1\nprint(a)\nfor i in range(2,a+1):\n if M%i==0:\n x=i\n if (M//i)>i and (M//i)<=a:\n x=M//i\n break\nprint(... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s032013460', 's249243547', 's619717477'] | [2940.0, 3060.0, 2940.0] | [18.0, 39.0, 39.0] | [120, 180, 171] |
p03241 | u981931040 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['def make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\nN , M = map(int,input().split())\ndivisors_list = make_divisors(M)\ndivisors_list.so... | ['Wrong Answer', 'Accepted'] | ['s954577674', 's062472720'] | [3188.0, 9396.0] | [20.0, 33.0] | [432, 451] |
p03241 | u983918956 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N,M = map(int,input().split())\nif M % N == 0:\n print(M // N)\n exit()\nfor i in range(N,0,-1):\n if M % i == 0:\n print(i)', '# N, D, K = map(int,input().split())\n# LR = [list(map(int,input().split())) for _ in range(D)]\n# ST = [list(map(int,input().split())) for _ in range(K)]\n\nfrom math import... | ['Wrong Answer', 'Accepted'] | ['s847249614', 's245553907'] | [3060.0, 3188.0] | [31.0, 20.0] | [134, 689] |
p03241 | u984276646 | 2,000 | 1,048,576 | You are given integers N and M. Consider a sequence a of length N consisting of positive integers such that a_1 + a_2 + ... + a_N = M. Find the maximum possible value of the greatest common divisor of a_1, a_2, ..., a_N. | ['N, M = map(int, input().split())\nS = 1\np = 0\nX = []\nfor i in range(2, int(M ** (1/2)) + 1):\n if M % i == 0:\n if i <= M // N:\n p = i\n X.append(i)\n else:\n break\nif M // N <= int(M ** (1/2)):\n if p != 0:\n S = p\nelse:\n if p != 0:\n for i in range(len(X)):\n if M % X[i] ==... | ['Wrong Answer', 'Accepted'] | ['s071851128', 's189584264'] | [3064.0, 3064.0] | [22.0, 22.0] | [363, 445] |
p03242 | u000212387 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["n = input()\nfor i in range(len(n)):\n if n[i] == '1':\n n[i]='9'\n else:\n n[i]='1'\n print(n)\n \n", "a=list(input())\nfor i in range(len(a)):\n if a[i]=='1':\n a[i]='9'\n else:\n a[i]='1'\nprint(''.join(a))"] | ['Runtime Error', 'Accepted'] | ['s368480973', 's499308149'] | [2940.0, 2940.0] | [17.0, 18.0] | [126, 119] |
p03242 | u002459665 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['import collections\n\nnum = int(input())\nvalues = [int(i) for i in input().split()]\n\nodd = [] \neven = [] # gusu\n\nfor n, i in enumerate(values):\n if (n + 1) % 2 == 0:\n even.append(i)\n else:\n odd.append(i)\n\nodd_counts = collections.Counter(odd)\neven_counts = collections.Counter(even)\... | ['Runtime Error', 'Accepted'] | ['s160973576', 's438552172'] | [3444.0, 2940.0] | [24.0, 17.0] | [1256, 75] |
p03242 | u003501233 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n=str(input())\nprint(n.replace("1","9").replace("9","1"))\n', 'n=int(input())\nprint(n.replace("1","9").replace("9","1").replace("1","a").replace("9","a"))\n', 'print(input().replace("1","").replace("9","1").replace("","9"))\n', 'n=int(input())\nprint(n.replace("1","9").replace("9","1").replace("1","1").replace("9",... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s085004035', 's246732792', 's273349847', 's298086388', 's339396779', 's497089116', 's497463669', 's530450956', 's602341044', 's712611456', 's846200569', 's909618882', 's993916490'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 17.0, 17.0, 20.0, 17.0, 17.0, 17.0] | [58, 92, 64, 92, 58, 93, 88, 53, 68, 92, 58, 58, 66] |
p03242 | u013756322 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["print(input().replace('1', '9').replace('9', '1'))", "print(input().replace('1', 'o').replace('9', 'n').replace('o', '1'))\n", "print(input().replace('1', 'o').replace('9', '1').replace('o', '1'))\n", "print(input().replace('1', 'o').replace('9', '1').replace('o', '9'))\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s276324151', 's962042559', 's998603633', 's489883040'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 18.0] | [50, 69, 69, 69] |
p03242 | u018916376 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['print 1110 - input', 'print(1110-int(input()))'] | ['Runtime Error', 'Accepted'] | ['s845764912', 's108830899'] | [2940.0, 2940.0] | [17.0, 17.0] | [18, 24] |
p03242 | u026075806 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['def chg(n):\n if n==1:\n return 9\n elif n==9:\n return 1\n return n\n\nn = int(input())\nn,a1 = divmod(n,10)\nn,a2 = divmod(n,10)\nn,a3 = divmod(n,10)\n\nprint(a3,a2,a1)\nprint(100*chg(a3)+10*chg(a2)+chg(a1))', 'def chg(n):\n if n==1:\n return 9\n elif n==9:\n return 1\n return n\n\nn = int(input()... | ['Wrong Answer', 'Accepted'] | ['s337044650', 's296003907'] | [3064.0, 3060.0] | [19.0, 17.0] | [205, 190] |
p03242 | u030726788 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["n = input()\nfor i in range(len(n)):\n if(n[i] == '1'):n[i] = '9'\n elif(n[i] == '9'):n[i] = '1'\nprint(n)", "n = list(input())\nfor i in range(len(n)):\n if(n[i] == '1'):n[i] = '9'\n elif(n[i] == '9'):n[i] = '1'\nprint(''.join(n))\n"] | ['Runtime Error', 'Accepted'] | ['s874990377', 's137420720'] | [2940.0, 2940.0] | [18.0, 17.0] | [108, 124] |
p03242 | u033524082 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = input()\nif n[0]=1:\n n[0]=9\nelse:\n n[0]=1\nif n[1]=1:\n n[1]=9\nelse:\n n[1]=1\nif n[2]=1:\n n[2]=9\nelse:\n n[2]=1\n\nprint(n)', 'n = input()\na = ""\nfor i in range(len(a)):\n if n[i]=="1":\n a +="9"\n else:\n a +="1"\nprint(a)', 'n = input()\na = ""\nfor i in range(len(n)):\n if n[i]=="1":\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s683891146', 's958590279', 's554731446'] | [2940.0, 3060.0, 2940.0] | [18.0, 20.0, 18.0] | [126, 99, 100] |
p03242 | u037221289 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["import collections\nN = int(input())\nV = input().split(' ')\n\nEVEN = V[0::2]\nODD = V[1::2]\nEVEN_V = collections.Counter(EVEN)\nODD_V = collections.Counter(ODD)\nif N == 2:\n print(0)\nA = len(EVEN_V)\nB = len(ODD_V)\n\n\nif EVEN_V.most_common()[0][1] >= ODD_V.most_common()[0][1]:\n MAX_ELE = EVEN_V.most_common(... | ['Runtime Error', 'Accepted'] | ['s326870834', 's725185003'] | [3316.0, 2940.0] | [21.0, 17.0] | [882, 169] |
p03242 | u037430802 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['s = input()\n\n\nfor i in range(len(s)):\n if s[i] == "1":\n s[i] = "9"\n else:\n s[i] = "1"\n \nprint(s)', 's = input()\n\nans = ""\nfor i in range(len(s)):\n if s[i] == "1":\n ans += "9"\n else:\n ans += "1"\n \nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s165587015', 's968999998'] | [2940.0, 2940.0] | [17.0, 18.0] | [107, 118] |
p03242 | u045408189 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["n=input()\nprint(n.replace('1','9').replace('9','1'))", "n=input()\nprint(n.replace('1','p').replace('9','1').replace('p','9'))\n"] | ['Wrong Answer', 'Accepted'] | ['s765984919', 's455609463'] | [2940.0, 2940.0] | [17.0, 18.0] | [52, 70] |
p03242 | u050708958 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["s = input()\nprint(s.replace('1', '').replace('9', '1') + s.replace('9', '').replace('1', '9'))", "s = input()\nprint(s.replace('9', '1') + s.replace('1', '9'))", "print(*['9' if i == '1' else '1' for i in input()], sep='')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s617919571', 's749354142', 's472177295'] | [2940.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0] | [94, 60, 59] |
p03242 | u057415180 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["n = input()\nfor i in range(3):\n if n[i] == '1':\n n[i] = '9'\n elif n[i] == '9':\n n[i] = '1'\nprint(n)", "n = input()\nfor i in range(3):\n if n[i] == '1':\n n.replace(n[i], '9')\n elif n[i] == '9':\n n.replace(n[i], '1')\nprint(n)", "n = input()\nprint(n.replace('1', 'a').r... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s811841256', 's904043836', 's389254806'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [119, 139, 73] |
p03242 | u058592821 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['print(1100-int(input()))', 'print(1110-int(input()))'] | ['Wrong Answer', 'Accepted'] | ['s407132236', 's606237056'] | [2940.0, 2940.0] | [17.0, 17.0] | [24, 24] |
p03242 | u058763808 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = int(input())\nv = [int(_) for _ in input().split()]\ncnt = 0\nfor i in range(2, n):\n if v[i-2] != v[i]:\n cnt += 1\nprint(cnt)', 'N = int(input())\nprint(1110-N)'] | ['Runtime Error', 'Accepted'] | ['s116963325', 's487955979'] | [2940.0, 3316.0] | [17.0, 19.0] | [129, 30] |
p03242 | u059210959 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['#encoding utf-8\nfrom collections import Counter\ndef main(n,v):\n odd = Counter(v[0::2]).most_common(2) + [(0,0)]\n even = Counter(v[1::2]).most_common(2) + [(0,0)]\n\n if odd[0][0] == even[0][0]:\n ans = min(n-odd[0][1]-even[1][1],\n n-odd[1][1]-even[0][1])\n else:\n ans = n-odd[0][... | ['Runtime Error', 'Accepted'] | ['s628101064', 's838978006'] | [3316.0, 3060.0] | [21.0, 17.0] | [446, 275] |
p03242 | u060392346 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = input()\nr = [10 - int(n[i]) for i in range(n)]\nprint("".join(map(str, r)))\n\n', 'n = input()\nr = [10 - int(n[i]) for i in range(3)]\nprint("".join(map(str, r)))\n\n'] | ['Runtime Error', 'Accepted'] | ['s603519181', 's063355096'] | [2940.0, 2940.0] | [18.0, 18.0] | [80, 80] |
p03242 | u060588488 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n=int(input())\nif n%111==0:\n print(n)\nelse:\n print( ((n//111)+1)*111 ) \n', 'n=list(input())\ns=""\nfor i in range(len(n)):\n if n[i]=="1":\n n[i]="9"\n else:\n n[i]="1"\n s=s+n[i]\nprint(s)\n'] | ['Wrong Answer', 'Accepted'] | ['s337001470', 's005973805'] | [2940.0, 2940.0] | [17.0, 17.0] | [78, 129] |
p03242 | u066017048 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['import collections\n \nn = int(input())\nvs = [int(i) for i in input().split()]\nevens = []\nodds = []\nfor i,num in enumerate(vs):\n if i % 2 == 0:\n evens.append(num)\n elif i % 2 == 1:\n odds.append(num)\n \ndef plana():\n if (len(set(vs)) == 2) and (len(set(evens)) == 1) and (len(set(odds))... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s036083770', 's181575211', 's275441550'] | [3316.0, 3316.0, 2940.0] | [21.0, 21.0, 17.0] | [757, 739, 250] |
p03242 | u071061942 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = input()\nif int(n) < int(n[0]) * 111:\n print(int(n[0]) * 111)\nelse:\n print((int(n[0]) + 1) * 111)', 'n = input()\nans = ""\nfor i in n:\n if i == "1":\n ans += "9"\n elif i == "9":\n ans += "1"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s299334327', 's562576069'] | [3060.0, 2940.0] | [19.0, 18.0] | [102, 105] |
p03242 | u072717685 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["s = input()\nr = 0\nif s[0] == '1':\n r += 900\nelse:\n r += 100\nif s[1] == '1':\n r += 90\nelse:\n r += 10 \nif s[2] == '1':\n r += 9\nelse:\n r += 1 ", "s = input().split()\nr = 0\nif s[0] == '1':\n r += 900\nelse:\n r += 100\nif s[1] == '1':\n r += 90\nelse:\n r += 10 \nif s[2] == '1':\n r += 9\nelse:\... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s292264010', 's548478847', 's173377907'] | [2940.0, 3068.0, 2940.0] | [17.0, 17.0, 17.0] | [145, 163, 154] |
p03242 | u081472919 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = int(input())\ns = str(n)\na = list(map(int,s))\nfor i in range(0,2):\n if a[i] == 1:\n a[i] = 9\n elif a[i] == 9:\n a[i] = 1\n\nprint(a[0]*100+a[1]*10+a[2])', "n = input()\na = ''\nfor i in range(len(n)):\n if n[i] == '1':\n a += '9'\n elif n[i] == '9':\n a += '1'\n ... | ['Wrong Answer', 'Accepted'] | ['s004235364', 's272896838'] | [9124.0, 8876.0] | [25.0, 28.0] | [171, 136] |
p03242 | u084320347 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['s = input()\nn = ""\nfor i in s:\n if i == "9":\n n+=1\n else:\n n+=9\nprint(n)', 's = input()\nn = ""\nfor i in s:\n if i == "9":\n n+="1"\n else:\n n+="9"\nprint(n)\n'] | ['Runtime Error', 'Accepted'] | ['s758993525', 's695769330'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 85] |
p03242 | u088020258 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = input()\nans = ""\n\tfor c in n:\n\t\tif c == "1":\n ans += "9"\n elif c == "9":\n ans += "1"\n else:\n ans += c\nprint(ans)', ' n = input()\n ans = ""\n for c in n:\n if c == "1":\n ans += "9"\n elif c == "9":\n ans += "1... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s406548368', 's976735795', 's663947783'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [163, 184, 100] |
p03242 | u089376182 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["print(input().replace('1', 'temp').replace('9', '1').replace('temp', '1'))", "n = input()\nans = n.replace('1', '2').replace('9', '1').replace('2', '9')\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s642820970', 's531348702'] | [2940.0, 2940.0] | [17.0, 17.0] | [74, 84] |
p03242 | u092460072 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['print(1100-int(input())', 'print(1100-int(input()))', 'print(1110-int(input()))'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s943663105', 's993491037', 's613389197'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [23, 24, 24] |
p03242 | u093033848 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['narray = list(input())\n\nsuuji = ""\nfor i in narray:\n if i == "3":\n i = "9"\n elif i == "9":\n i = "3"\n suuji += i\nprint(suuji)', 'narray = list(input())\n\nsuuji = ""\nfor i in narray:\n if i == "3":\n i = "9"\n elif i == "9":\n i = "3"\n suuji += i\nprint(int(suuj... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s084887143', 's645395790', 's898758717'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0] | [147, 153, 147] |
p03242 | u094815239 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['from collections import Counter\nn = int(input().strip())\na = list(map(int, input().strip().split()))\n\nc1 = Counter(a[::2])\nc2 = Counter(a[1::2])\nc1f1 = max(c1, key = lambda k:c1[k])\nc2f1 = max(c2, key = lambda k:c2[k])\n\nif c1f1 != c2f1:\n return n - c1[c1f1] - c2[c2f1]\nelse:\n if c1[c1f1] > c2[c2f1]:\n ... | ['Runtime Error', 'Accepted'] | ['s944617995', 's180272707'] | [3064.0, 2940.0] | [18.0, 17.0] | [557, 102] |
p03242 | u095426154 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['import sys\nn=int(input())\narr=input().split(" ")\narr_s=set(arr)\nif len(arr_s)==1:\n print(int(n/2))\n sys.exit()\n#print(arr)\na=0\nmost_e=0\nmost_o=0\narr_e=[0 for i in range(int(n/2))]\narr_o=[0 for i in range(int(n/2))]\nfor i in range(int(n/2)):\n arr_e[i]=arr[a]\n arr_o[i]=arr[a+1]\n a+=2\n#pr... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s055394257', 's097998098', 's913092801', 's131921035'] | [3064.0, 3064.0, 3316.0, 3060.0] | [17.0, 18.0, 21.0, 18.0] | [609, 665, 484, 199] |
p03242 | u102242691 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['\nn = input()\nans = ""\n\nfor i in range(n):\n if n[i] == 1:\n ans += "9"\n else:\n ans += "1"\nprint(int(ans))\n', '\nn = input()\nans = ""\n\nfor i in range(len(n)):\n if n[i] == "1":\n ans += "9"\n else:\n ans += "1"\nprint(int(ans))\n'] | ['Runtime Error', 'Accepted'] | ['s418217784', 's224353357'] | [2940.0, 2940.0] | [17.0, 17.0] | [124, 131] |
p03242 | u102960641 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['print(1100-int((input()))', 'n = int(input())\na = [111,222,333,444,555,666,777,888,999]\nb = 0\nfor i in a:\n if i >= n:\n b = i\n break\nprint(b)', 'print(1100-int((input()))', 'print(1100-int(input()))', 'print(1110-int(input()))'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s110612353', 's794022399', 's859701395', 's900048994', 's862717120'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [16.0, 17.0, 17.0, 17.0, 17.0] | [25, 118, 25, 24, 24] |
p03242 | u106103668 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['print(input().replace(1,0).replace(9,1).replace(0,9))', "print(str(input()).replace('1','0').replace('9','1').replace('0','9'))"] | ['Runtime Error', 'Accepted'] | ['s614720397', 's521718138'] | [2940.0, 2940.0] | [17.0, 17.0] | [53, 70] |
p03242 | u106297876 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["c=list(input())\nans=str()\nfor i in range(len(c)):\n if c[i]=='9':\n c[i]='1'\n ans+=c[i]\nprint(int(ans))", "c=list(input())\nans=str()\nans=str()\nfor i in range(len(c)):\n if c[i]=='9':\n c[i]='1'\n else:\n c[i]='9'\n \n ans+=c[i]\n \nprint(int(ans))"] | ['Wrong Answer', 'Accepted'] | ['s265601353', 's454480369'] | [2940.0, 2940.0] | [18.0, 18.0] | [114, 165] |
p03242 | u107091170 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["S=input()\nfor i in range(3):\n if S[i]=='1':\n S[i] = '9'\n elif S[i]=='9':\n S[i] = '1'\nprint(S)\n ", 'S=input()\nS = S.replace("1", "Z")\nS = S.replace("9", "1")\nS = S.replace("Z", "9")\nprint(S)\n'] | ['Runtime Error', 'Accepted'] | ['s937090640', 's866934486'] | [2940.0, 2940.0] | [17.0, 17.0] | [106, 91] |
p03242 | u108990937 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["import collections\nn=int(input())\nv=[int(i) for i in input().split(' ')]\n\nv_odd = v[1::2]\nv_even = v[0::2]\n\nvo = collections.Counter(v_odd).most_common()\nve = collections.Counter(v_even).most_common()\n\n\nif vo[0][0] == ve[0][0]:\n \n if vo[0][1] > ve[0][1]:\n result = len(v_odd) - vo[0][1] + le... | ['Runtime Error', 'Accepted'] | ['s084173750', 's586661382'] | [3444.0, 2940.0] | [22.0, 17.0] | [627, 110] |
p03242 | u112567325 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['N = input()\nstr = list(N)\nfor i in range(3):\n if str[i] == 9:\n str[i] = 1\n elif str[i] == 1:\n str[i] = 9\nstr2 = "".join(str)\nprint(str2)', 'N = input()\nstr = list(N)\nfor i in range(3):\n if str[i] == "9":\n str[i] = "1"\n elif str[i] == "1":\n str[i] = "9"\nprint(str)\nstr2 = "".join(str)\np... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s420459602', 's842779374', 's021711307'] | [2940.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0] | [144, 163, 152] |
p03242 | u113971909 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["ret = ''\nfor a in input():\n if a = '1':\n ret += '9'\n elif a = '9':\n ret += '1'\n else:\n ret += a\nprint(ret)", "ret = ''\nfor a in input():\n if a == '1':\n ret += '9'\n elif a == '9':\n ret += '1'\n else:\n ret += a\nprint(ret)\n"] | ['Runtime Error', 'Accepted'] | ['s809298526', 's327570820'] | [8936.0, 9052.0] | [20.0, 30.0] | [118, 121] |
p03242 | u121732701 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = list(input())\ncount = 0\n\nfor i in n:\n if i == "1":\n n[count] = "9"\n elif i == "9":\n n[count] = "1"\n count += 1\n\nprint("".job(n))', 'n = list(input())\ncount = 0\n\nfor i in n:\n if i == "1":\n n[count] = "9"\n elif i == "9":\n n[count] = "1"\n count += 1\n\n... | ['Runtime Error', 'Accepted'] | ['s333341670', 's659674531'] | [2940.0, 2940.0] | [17.0, 17.0] | [155, 156] |
p03242 | u122195031 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = input()\nN = list(n)\nfor i in N:\n if i == "1":\n i = "9"\n else:\n i = "1"\nprint(n)', 'n = input()\nlst = []\nN = list(n)\nfor i in N:\n if i == "1":\n lst.append("9")\n else:\n lst.append("1")\nprint("".join(lst))'] | ['Wrong Answer', 'Accepted'] | ['s190823439', 's953831447'] | [2940.0, 2940.0] | [17.0, 17.0] | [91, 127] |
p03242 | u127499732 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n=str(input())\nprint(n.replace("1","0").replace("9","1").replace("0","1"))', 's=["9" if x=="1" else "9" for x in input()]\nprint("".join(s))', 's=["9" if x=="1" else "9" for x in list(input())]\nprint("".join(s))', 'def main():\n s=["9" if x=="1" else "1" for x in input()]\n print("".join(s))\nif __name__=="__main... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s137564010', 's161514954', 's229844503', 's741505723'] | [2940.0, 2940.0, 2940.0, 2940.0] | [19.0, 17.0, 17.0, 17.0] | [74, 61, 67, 111] |
p03242 | u127856129 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['a=input()\nprint(a.replace("1","9").replace("9","1"))', 'a=list(input())\nprint(a.replace("1","9").replace("9","1"))', 'a=input()\nprint(a.replace("1","9").replace("9","1"))', '\nprint(input().replace("1","9").replace("9","1"))', 'a=input()\nprint(a.replace("1","x").replace("9","1").replace("x","9"))'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s086743139', 's512847096', 's553509716', 's590665305', 's225444150'] | [2940.0, 2940.0, 2940.0, 2940.0, 3064.0] | [17.0, 18.0, 18.0, 18.0, 17.0] | [52, 58, 52, 49, 69] |
p03242 | u129978636 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = list(map( int, sinput()))\n \nh = 3\nfor i in range(h):\n if( n[i] == 1):\n n[i] = 9\n n[i] = str(n[i]) \n else:\n n[i] = 1\n n[i] = str(n[i])\n \na = "".join(n)\n \nprint(a)', 'N = int( input())\n \nn = N // 100\n \nif( N % 100 <= n * 10 + n):\n\tprint(n * 100 + n * 10 + n )\n \nelse:\n \tpr... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s266399914', 's479231329', 's754569716', 's804491314', 's867650034', 's904255001', 's910158602'] | [3060.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [18.0, 18.0, 17.0, 18.0, 18.0, 18.0, 18.0] | [184, 139, 100, 178, 183, 150, 183] |
p03242 | u131264627 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["print(''.join(['1' if '9' else '9' for i in input()]))", "print(''.join(['1' if i == '9' else '9' for i in input()]))"] | ['Wrong Answer', 'Accepted'] | ['s384773393', 's511208476'] | [2940.0, 2940.0] | [17.0, 17.0] | [54, 59] |
p03242 | u131406572 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['s=list(input())\nfor i in range(3):\n if s[i]=="1":\n s[i]=9\n else:\n s[i]=1\nprint(s)', '#112a\ns=list(input())\nfor i in range(3):\n if s[i]==1:\n s[i]=9\n else:\n s[i]=1\nprint(s)', 's=list(input())\nfor i in range(s):\n\tif s[i]==1:\n \ts[i]=9\n else:\n \ts[i]=1',... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s038365886', 's211493468', 's827075723', 's198813226'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0] | [101, 105, 81, 121] |
p03242 | u136811344 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ["n = input()\nprint(n.replace('1', '_').replace('9', '1').replace('_', '9')", "n = input()\nprint(n.replace('1', '_').replace('9', '1').replace('_', '9'))"] | ['Runtime Error', 'Accepted'] | ['s473248524', 's419918792'] | [2940.0, 2940.0] | [17.0, 17.0] | [73, 74] |
p03242 | u138486156 | 2,000 | 1,048,576 | Cat Snuke is learning to write characters. Today, he practiced writing digits `1` and `9`, but he did it the other way around. You are given a three-digit integer n written by Snuke. Print the integer obtained by replacing each digit `1` with `9` and each digit `9` with `1` in n. | ['n = int(input())\nXY = [list(map(int, input().split())) for _ in range(n)]\nmod = sum(XY[0])%2\nfor x, y in XY:\n if mod != (x+y)%2:\n print(-1)\n exit()\n\nm = 33-mod\nprint(m)\nD = [2**i for i in range(31, -1, -1)]\nif mod:\n D.append(1)\n\nprint(" ".join(map(str, D)))\nfor x, y in XY:\n w = ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s108124814', 's693617778', 's112469449'] | [3064.0, 3316.0, 2940.0] | [17.0, 20.0, 17.0] | [614, 540, 92] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.