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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03213 | u260216890 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['x=[]\n\nfor j in range(100):\n m=j+1\n pf={}\n for i in range(2,int(m**0.5)+1):\n while m%i==0:\n pf[i]=pf.get(i,0)+1\n m//=i\n if m>1:pf[m]=1\n x.append(pf)\n\nN=int(input())\nif N==1:\n print(0)\n exit()\n\nfrom collections import defaultdict\nd=defaultdict(int)\nfor i in range(1,N):\n for k in x[i].keys():\n d[k]+=x[i][k]\n\nprint(d)\nover2=0\nover4=0\nover14=0\nover24=0\nover74=0\nfor k in d.keys():\n if d[k]>=2:\n over2+=1\n if d[k]>=4:\n over4+=1\n if d[k]>=14:\n over14+=1\n if d[k]>=24:\n over24+=1\n if d[k]>=74:\n over74+=1\n\nans=0\n#case1\nans+=over4*(over4-1)//2*(over2-2)\n#case2\nans+=over14*(over4-1)\n#case3\nans+=over24*(over2-1)\n#case4\nans+=over74\nprint(ans)', 'x=[]\n\nfor j in range(100):\n m=j+1\n pf={}\n for i in range(2,int(m**0.5)+1):\n while m%i==0:\n pf[i]=pf.get(i,0)+1\n m//=i\n if m>1:pf[m]=1\n x.append(pf)\n\nN=int(input())\nif N==1:\n print(0)\n exit()\n\nfrom collections import defaultdict\nd=defaultdict(int)\nfor i in range(1,N):\n for k in x[i].keys():\n d[k]+=x[i][k]\n\n#print(d)\nover2=0\nover4=0\nover14=0\nover24=0\nover74=0\nfor k in d.keys():\n if d[k]>=2:\n over2+=1\n if d[k]>=4:\n over4+=1\n if d[k]>=14:\n over14+=1\n if d[k]>=24:\n over24+=1\n if d[k]>=74:\n over74+=1\n\nans=0\n#case1\nans+=over4*(over4-1)//2*(over2-2)\n#case2\nans+=over14*(over4-1)\n#case3\nans+=over24*(over2-1)\n#case4\nans+=over74\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s724268435', 's879117568'] | [3444.0, 3316.0] | [22.0, 21.0] | [744, 745] |
p03213 | u278868910 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['import copy\ndef getPrimes(n):\n res = {}\n for i in range(2, n+1):\n if n % i == 0:\n res[i] = 0\n while n % i == 0:\n res[i] = res[i] + 1\n n = n // i\n if i * i > n:\n break;\n \n if n != 1:\n res[n] = 1\n return res\n\ndef add(a, b):\n res = copy.deepcopy(a)\n for i in b:\n if i in res:\n res[i] = res[i] + b[i]\n else:\n res[i] = b[i]\n return res\n\nN = int(input())\ncnt = {}\nfor i in range(1, N+1):\n cnt = add(cnt, getPrimes(i))\n\nnum = []\nfor i in cnt:\n num.append(cnt[i])\nnum.sort()\nprint(num)\nans = 0\nfor i in range(len(num)):\n for j in range(len(num)):\n for k in range(j + 1, len(num)):\n if i == j or i == k:\n continue\n if num[i] >= 2 and num[j] >= 4 and num[k] >= 4:\n ans = ans + 1\n \nfor i in range(len(num)):\n for j in range(len(num)):\n if i != j and num[i] >= 2 and num[j] >= 24:\n ans = ans + 1\n \nfor i in range(len(num)):\n for j in range(len(num)):\n if i != j and num[i] >= 4 and num[j] >= 14:\n ans = ans + 1\n \nfor i in range(len(num)):\n if num[i] >= 74:\n\n \n ans = ans + 1\nprint(ans)\n\n\n', 'import copy\ndef getPrimes(n):\n res = {}\n for i in range(2, n+1):\n if n % i == 0:\n res[i] = 0\n while n % i == 0:\n res[i] = res[i] + 1\n n = n // i\n if i * i > n:\n break;\n \n if n != 1:\n res[n] = 1\n return res\n\ndef add(a, b):\n res = copy.deepcopy(a)\n for i in b:\n if i in res:\n res[i] = res[i] + b[i]\n else:\n res[i] = b[i]\n return res\n\nN = int(input())\ncnt = {}\nfor i in range(1, N+1):\n cnt = add(cnt, getPrimes(i))\n\nnum = []\nfor i in cnt:\n num.append(cnt[i])\nnum.sort()\nans = 0\nfor i in range(len(num)):\n for j in range(len(num)):\n for k in range(j + 1, len(num)):\n if i == j or i == k:\n continue\n if num[i] >= 2 and num[j] >= 4 and num[k] >= 4:\n ans = ans + 1\n \nfor i in range(len(num)):\n for j in range(len(num)):\n if i != j and num[i] >= 2 and num[j] >= 24:\n ans = ans + 1\n \nfor i in range(len(num)):\n for j in range(len(num)):\n if i != j and num[i] >= 4 and num[j] >= 14:\n ans = ans + 1\n \nfor i in range(len(num)):\n if num[i] >= 74:\n\n \n ans = ans + 1\nprint(ans)\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s762172956', 's198039271'] | [3444.0, 3444.0] | [28.0, 28.0] | [1289, 1278] |
p03213 | u335278042 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['\n\ndef cmb(n,r):\n \tif n ==1:\n return 0\n else:\n r=min(r,n-r)\n result=1\n for i in range(n-r+1,n+1):\n result*=i\n for i in range(1,r+1):\n result//=i\n return result\n\n\ndef factorize(n):\n i=2\n result={}\n while True:\n if i**2>n:\n break\n count=0\n while n%i==0:\n n//=i\n count+= 1\n if count!=0:\n result[i]=count\n i+=1\n if n>1:\n result[n]=1\n return result\n\nN = int(input())\nl={}\nfor i in range(1,N+1):\n for i,j in factorize(i).items():\n l[i] = l.get(i,0)+j\n\n\nl2 = [0]*5\n\nr = 0\nfor j,i in l.items():\n if i>=74:\n l2[4]+=1\n elif i>=24:\n l2[3]+=1\n elif i>=14:\n l2[2]+=1\n elif i>=4:\n l2[1]+=1\n elif i>=2:\n l2[0]+=1\n# print(l)\n# print(l2)\n\nr += l2[4]\nr += sum(l2[3:])*(sum(l2)-1)\nr += sum(l2[2:])*(sum(l2[1:])-1)\nr += cmb(sum(l2[1:]),2)*(sum(l2)-2)\nprint(r)', '\ndef cmb(n,r):\n if n==0:return 0\n else:\n r=min(r,n-r)\n result=1\n for i in range(n-r+1,n+1):\n result*=i\n for i in range(1,r+1):\n result//=i\n return result\n\n\ndef factorize(n):\n i=2\n result={}\n while True:\n if i**2>n:\n break\n count=0\n while n%i==0:\n n//=i\n count+= 1\n if count!=0:\n result[i]=count\n i+=1\n if n>1:\n result[n]=1\n return result\n\nN = int(input())\nl={}\nfor i in range(1,N+1):\n for i,j in factorize(i).items():\n l[i] = l.get(i,0)+j\n\n\nl2 = [0]*5\n\nr = 0\nfor j,i in l.items():\n if i>=74:\n l2[4]+=1\n elif i>=24:\n l2[3]+=1\n elif i>=14:\n l2[2]+=1\n elif i>=4:\n l2[1]+=1\n elif i>=2:\n l2[0]+=1\nprint(l)\nprint(l2)\n\nr += l2[4]\nr += sum(l2[3:])*(sum(l2)-1)\nr += sum(l2[2:])*(sum(l2[1:])-1)\nr += cmb(sum(l2[1:]),2)*(sum(l2)-2)\nprint(r)', '\ndef cmb(n,r):\n if n==0:return 0\n else:\n r=min(r,n-r)\n result=1\n for i in range(n-r+1,n+1):\n result*=i\n for i in range(1,r+1):\n result//=i\n return result\n\n\ndef factorize(n):\n i=2\n result={}\n while True:\n if i**2>n:\n break\n count=0\n while n%i==0:\n n//=i\n count+= 1\n if count!=0:\n result[i]=count\n i+=1\n if n>1:\n result[n]=1\n return result\n\nN = int(input())\nl={}\nfor i in range(1,N+1):\n for i,j in factorize(i).items():\n l[i] = l.get(i,0)+j\n\n\nl2 = [0]*5\n\nr = 0\nfor j,i in l.items():\n if i>=74:\n l2[4]+=1\n elif i>=24:\n l2[3]+=1\n elif i>=14:\n l2[2]+=1\n elif i>=4:\n l2[1]+=1\n elif i>=2:\n l2[0]+=1\n\nr += l2[4]\nr += sum(l2[3:])*(sum(l2)-1)\nr += sum(l2[2:])*(sum(l2[1:])-1)\nr += cmb(sum(l2[1:]),2)*(sum(l2)-2)\nprint(r)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s040333967', 's254263629', 's970442549'] | [2940.0, 3064.0, 3064.0] | [19.0, 18.0, 18.0] | [1028, 1030, 1011] |
p03213 | u346812984 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['import sys\n\n\nsys.setrecursionlimit(10 ** 6)\nINF = float("inf")\nMOD = 10 ** 9 + 7\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\ndef factorization(N):\n d = {}\n for n in range(2, N + 1):\n tmp = n\n for i in range(2, int(n ** 0.5) + 1):\n if tmp % i == 0:\n cnt = 0\n while tmp % i == 0:\n cnt += 1\n tmp //= i\n if i not in d:\n d[i] = cnt\n else:\n d[i] += cnt\n\n if tmp != 1:\n if tmp not in d:\n d[tmp] = 1\n else:\n d[tmp] += 1\n\n return d\n\n\ndef main():\n N = int(input())\n d = factorization(N)\n d = [v for k, v in d.items() if v > 1]\n n = len(d)\n print(d)\n ans = 0\n for i in range(n):\n val = d[i]\n if val >= 74:\n ans += 1\n\n if val >= 24:\n ans += n - 1\n\n if val >= 14:\n cnt = 0\n for j in range(n):\n if i == j:\n continue\n if d[j] >= 4:\n cnt += 1\n ans += cnt\n\n cnt_4 = 0\n cnt_2 = 0\n for i in range(n):\n if d[i] >= 4:\n cnt_4 += 1\n else:\n cnt_2 += 1\n\n ans += (cnt_4 - 1) * cnt_4 // 2 * cnt_2\n ans += (cnt_4 - 2) * (cnt_4 - 1) * cnt_4 // 2\n\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n', 'import sys\n\n\nsys.setrecursionlimit(10 ** 6)\nINF = float("inf")\nMOD = 10 ** 9 + 7\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\ndef factorization(N):\n d = {}\n for n in range(2, N + 1):\n tmp = n\n for i in range(2, int(n ** 0.5) + 1):\n if tmp % i == 0:\n cnt = 0\n while tmp % i == 0:\n cnt += 1\n tmp //= i\n if i not in d:\n d[i] = cnt\n else:\n d[i] += cnt\n\n if tmp != 1:\n if tmp not in d:\n d[tmp] = 1\n else:\n d[tmp] += 1\n\n return d\n\n\ndef main():\n N = int(input())\n d = factorization(N)\n d = [v for k, v in d.items() if v > 1]\n cnt = {2: 0, 4: 0, 14: 0, 24: 0, 74: 0}\n cnt[2] = len(d)\n for i in range(len(d)):\n val = d[i]\n if val >= 74:\n cnt[74] += 1\n if val >= 24:\n cnt[24] += 1\n if val >= 14:\n cnt[14] += 1\n if val >= 4:\n cnt[4] += 1\n\n ans = cnt[74]\n ans += cnt[24] * (cnt[2] - 1)\n ans += cnt[14] * (cnt[4] - 1)\n ans += cnt[4] * (cnt[4] - 1) // 2 * (cnt[2] - 2)\n\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n'] | ['Wrong Answer', 'Accepted'] | ['s105659441', 's413523478'] | [3064.0, 3188.0] | [17.0, 18.0] | [1438, 1261] |
p03213 | u360116509 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ["def check(m, e):\n return len(list(filter(lambda x: x >= m - 1, e)))\n\n\ndef check_1(m, e):\n return list(filter(lambda x: x >= m - 1, e))\n\n\ndef main():\n N = int(input())\n e = [0] * (N + 1)\n\n for i in range(2, N + 1):\n ii = i\n for j in range(2, i + 1):\n while ii % j == 0:\n e[j] += 1\n ii //= j\n\n print(check_1(25, e), check_1(3, e))\n print(check(75, e) +\n check(25, e) * (check(3, e) - 1) +\n check(15, e) * (check(5, e) - 1) +\n check(5, e) * (check(5, e) - 1) * (check(3, e) - 2) // 2)\n\n\nif __name__ == '__main__':\n main()\n", "def check(m, e):\n return len(list(filter(lambda x: x >= m - 1, e)))\n\n\ndef main():\n N = int(input())\n e = [0] * (N + 1)\n\n for i in range(2, N + 1):\n ii = i\n for j in range(2, i + 1):\n while ii % j == 0:\n e[j] += 1\n ii //= j\n\n print(check(75, e) +\n check(25, e) * (check(3, e) - 1) +\n check(15, e) * (check(5, e) - 1) +\n check(5, e) * (check(5, e) - 1) * (check(3, e) - 2) // 2)\n\n\nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Accepted'] | ['s225999190', 's646510002'] | [3064.0, 3064.0] | [18.0, 18.0] | [625, 514] |
p03213 | u362560965 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['import math\nimport itertools\nfrom collections import defaultdict\n\ndef 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]]\n\n\nN = int(input())\n# N = 50\nanslist = []\n\n\n\nfor p in primes(N):\n tmp = 0\n i = 1\n while True:\n tmp2 = math.floor(N/(p**i))\n if tmp2 == 0:\n break\n else:\n tmp += tmp2\n i += 1\n anslist.append(tmp)\n\nprint(anslist)\nans = 0\nfor a in anslist:\n if a<2:\n continue\n else:\n templist = anslist.copy()\n templist.remove(a)\n templist = [i for i in templist if i >= 4]\n r = len(templist)\n # print(templist)\n # print(int((r*(r-1))/2))\n ans += (r*(r-1))/2\n\n\nprint(int(ans))', 'import math\nimport itertools\nfrom collections import defaultdict\n\ndef 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]]\n\n\nN = int(input())\nanslist = []\n\nprint(primes(N))\n\nfor p in primes(N):\n tmp = 0\n i = 1\n while True:\n tmp2 = math.floor(N/(p**i))\n if tmp2 == 0:\n break\n else:\n tmp += tmp2\n i += 1\n anslist.append(tmp)\n\nprint(anslist)\nans = 0\nfor a in anslist:\n if a<2:\n continue\n else:\n templist = anslist.copy()\n templist.remove(a)\n templist = [i for i in templist if i >= 4]\n r = len(templist)\n print(templist)\n print(int((r*(r-1))/2))\n ans += (r*(r-1))/2\n\n\nprint(int(ans))', 'import math\nimport itertools\nfrom collections import defaultdict\n\ndef 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]]\n\n\nN = int(input())\n# N = 100\nanslist = []\n\nprimelist = primes(N)\n\nfor p in primelist:\n tmp = 0\n i = 1\n while True:\n tmp2 = math.floor(N/(p**i))\n if tmp2 == 0:\n break\n else:\n tmp += tmp2\n i += 1\n anslist.append(tmp)\n\n\n# print(anslist)\n# print("------")\n\nans = []\n\npqrlist = [[4,4,2],[14,4,0],[24,2,0],[74,0,0]]\n\ncombs = list(itertools.permutations(range(len(anslist)), 3))\nfor pqr in pqrlist:\n for c in combs:\n pp,qq,rr = anslist[c[0]], anslist[c[1]], anslist[c[2]]\n if pp >= pqr[0] and qq >= pqr[1] and rr >= pqr[2]:\n p,q,r = primelist[c[0]], primelist[c[1]], primelist[c[2]]\n product = (p**pqr[0])*(q**pqr[1])*(r**pqr[2])\n if product not in ans:\n ans.append(product)\n\nprint(len(ans))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s098356351', 's320357426', 's291985849'] | [3440.0, 3568.0, 4468.0] | [21.0, 25.0, 62.0] | [975, 960, 1208] |
p03213 | u405660020 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['n=int(input())\n\ndef prime_fact(x):\n fact=[]\n for i in range(2, int(x**(0.5))+1):\n while x%i==0:\n fact.append(i)\n x//=i\n if x!=1:\n fact.append(x)\n if not fact:\n fact=[x]\n return fact\n\nprint(prime_fact(n))\n\ndef eratosthenes(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]]\np=eratosthenes(100)\nd={}\nfor p_i in p:\n d[p_i]=0\nfor i in range(2,n+1):\n pf=prime_fact(i)\n for pf_i in pf:\n d[pf_i]+=1\nprint(d)\n\ncnt74=0\ncnt24=0\ncnt14=0\ncnt4=0\ncnt2=0\n\nfor key in d:\n if d[key]>=74:\n cnt74+=1\n if d[key]>=24:\n cnt24+=1\n if d[key]>=14:\n cnt14+=1\n if d[key]>=4:\n cnt4+=1\n if d[key]>=2:\n cnt2+=1\n\nprint(cnt74,cnt24,cnt14,cnt4,cnt2)\n\nprint(int(cnt74+(cnt2-1)*cnt24+(cnt4-1)*cnt14+(cnt2-2)*cnt4*(cnt4-1)/2))\n', 'n=int(input())\n\ndef prime_fact(x):\n fact=[]\n for i in range(2, int(x**(0.5))+1):\n while x%i==0:\n fact.append(i)\n x//=i\n if x!=1:\n fact.append(x)\n if not fact:\n fact=[x]\n return fact\n\ndef eratosthenes(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]]\np=eratosthenes(100)\nd={}\nfor p_i in p:\n d[p_i]=0\nfor i in range(2,n+1):\n pf=prime_fact(i)\n for pf_i in pf:\n d[pf_i]+=1\n\ncnt74=0\ncnt24=0\ncnt14=0\ncnt4=0\ncnt2=0\n\nfor key in d:\n if d[key]>=74:\n cnt74+=1\n if d[key]>=24:\n cnt24+=1\n if d[key]>=14:\n cnt14+=1\n if d[key]>=4:\n cnt4+=1\n if d[key]>=2:\n cnt2+=1\n\nprint(int(cnt74+(cnt2-1)*cnt24+(cnt4-1)*cnt14+(cnt2-2)*cnt4*(cnt4-1)/2))\n'] | ['Wrong Answer', 'Accepted'] | ['s999254134', 's274349797'] | [3064.0, 3064.0] | [18.0, 18.0] | [1062, 995] |
p03213 | u480300350 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['#!/usr/bin/env python3\n\nimport sys\nimport math\n# from string import ascii_lowercase, ascii_upper_case, ascii_letters, digits, hexdigits\n# import re # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)\n# from operator import itemgetter # itemgetter(1), itemgetter(\'key\')\n\n# from collections import defaultdict # subclass of dict. defaultdict(facroty)\nfrom collections import Counter # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)\n# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).\n# from heapq import nlargest, nsmallest # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).\n# from itertools import count, cycle, repeat # count(start[,step]), cycle(iter), repeat(elm[,n])\n# from itertools import groupby # [(k, list(g)) for k, g in groupby(\'000112\')] returns [(\'0\',[\'0\',\'0\',\'0\']), (\'1\',[\'1\',\'1\']), (\'2\',[\'2\'])]\n# from itertools import starmap # starmap(pow, [[2,5], [3,2]]) returns [32, 9]\n# from itertools import product, permutations # product(iter, repeat=n), permutations(iter[,r])\n# from itertools import combinations, combinations_with_replacement\n# from itertools import accumulate # accumulate(iter[, f])\n# from functools import reduce # reduce(f, iter[, init])\n# from functools import lru_cache # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)\n# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).\n# from copy import deepcopy # to copy multi-dimentional matrix without reference\n# from fractions import gcd # for Python 3.4 (previous contest @AtCoder)\n\n\ndef main():\n mod = 1000000007 # 10^9+7\n inf = float(\'inf\') # sys.float_info.max = 1.79...e+308\n # inf = 2 ** 64 - 1 # (for fast JIT compile in PyPy) 1.84...e+19\n sys.setrecursionlimit(10**6) # 1000 -> 1000000\n def input(): return sys.stdin.readline().rstrip()\n def ii(): return int(input())\n def mi(): return map(int, input().split())\n def mi_0(): return map(lambda x: int(x)-1, input().split())\n def lmi(): return list(map(int, input().split()))\n def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))\n def li(): return list(input())\n \n \n class Eratos:\n def __init__(self, num):\n \n assert(num >= 1)\n self.table_max = num\n \n self.table = [False if i == 0 or i == 1 else True for i in range(num+1)]\n for i in range(2, int(math.sqrt(num)) + 1):\n if self.table[i]:\n for j in range(i ** 2, num + 1, i): \n self.table[j] = False\n \n def is_prime(self, num):\n \n assert(num >= 1)\n if num > self.table_max:\n raise ValueError(\'Eratos.is_prime(): exceed table_max({}). got {}\'.format(self.table_max, num))\n return self.table[num]\n \n def prime_factorize(self, num):\n \n assert(num >= 1)\n if int(math.sqrt(num)) > self.table_max:\n raise ValueError(\'Eratos.prime_factorize(): exceed prime table size. got {}\'.format(num))\n \n factorized_dict = dict()\n candidate_prime_numbers = [i for i in range(2, int(math.sqrt(num)) + 1) if self.is_prime(i)]\n \n \n for p in candidate_prime_numbers:\n if num == 1: \n break\n if num % p == 0:\n cnt = 0\n while num % p == 0:\n num //= p\n cnt += 1\n factorized_dict[p] = cnt\n if num != 1:\n factorized_dict[num] = 1\n return factorized_dict\n \n def enum_divisor(self, num):\n \n divisor_small = []\n divisor_large = []\n for i in range(1, int(math.sqrt(num)) + 1):\n if num % i == 0:\n divisor_small.append(i)\n if i != num // i:\n divisor_large.append(num // i)\n divisor_large.reverse()\n return divisor_small + divisor_large\n \n n = ii()\n e = Eratos(n)\n c = Counter()\n for i in range(2, n + 1):\n c += Counter(e.prime_factorize(i))\n print(c)\n \n gt_74_candidate = 0\n gt_24_candidate = 0\n gt_14_candidate = 0\n gt_4_candidate = 0\n gt_2_candidate = 0\n for _, v in c.items():\n if v >= 2:\n gt_2_candidate += 1\n if v >= 4:\n gt_4_candidate += 1\n if v >= 14:\n gt_14_candidate += 1\n if v >= 24:\n gt_24_candidate += 1\n if v >= 74:\n gt_74_candidate += 1\n \n def calc_3_5_5(a, b):\n res = a - b\n if a >= 3 and b >= 2:\n # bC2 * resC1 + bC3\n return (b * (b-1) // 2) * res + (b * (b-1) * (b-2) // 6)\n else:\n return 0\n \n def calc_5_15(a, b):\n res = a - b\n if a >= 2 and b >= 1:\n # bC1 * resC1 + bC2\n return b * res + (b * (b-1) // 2) \n else:\n return 0\n \n def calc_3_25(a, b):\n res = a - b\n if a >= 2 and b >= 1:\n # bC1 * resC1 + bC2\n return b * res + (b * (b-1) // 2)\n else:\n return 0\n \n def calc_75(a):\n if a >= 1:\n return a\n else:\n return 0\n\n\n def calc_all_75_num(gt_2_candidate, gt_4_candidate, gt_14_candidate, gt_24_candidate, gt_74_candidate):\n ans = 0\n ans += calc_3_5_5(gt_2_candidate, gt_4_candidate)\n print(ans)\n ans += calc_5_15(gt_4_candidate, gt_14_candidate)\n print(ans)\n ans += calc_3_25(gt_2_candidate, gt_24_candidate)\n print(ans)\n ans += calc_75(gt_74_candidate)\n # print(ans)\n return ans\n \n print(calc_all_75_num(gt_2_candidate, gt_4_candidate, gt_14_candidate, gt_24_candidate, gt_74_candidate))\n\n\n\nif __name__ == "__main__":\n main()', '#!/usr/bin/env python3\n\nimport sys\nimport math\n# from string import ascii_lowercase, ascii_upper_case, ascii_letters, digits, hexdigits\n# import re # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)\n# from operator import itemgetter # itemgetter(1), itemgetter(\'key\')\n\n# from collections import defaultdict # subclass of dict. defaultdict(facroty)\nfrom collections import Counter # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)\n# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).\n# from heapq import nlargest, nsmallest # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).\n# from itertools import count, cycle, repeat # count(start[,step]), cycle(iter), repeat(elm[,n])\n# from itertools import groupby # [(k, list(g)) for k, g in groupby(\'000112\')] returns [(\'0\',[\'0\',\'0\',\'0\']), (\'1\',[\'1\',\'1\']), (\'2\',[\'2\'])]\n# from itertools import starmap # starmap(pow, [[2,5], [3,2]]) returns [32, 9]\n# from itertools import product, permutations # product(iter, repeat=n), permutations(iter[,r])\n# from itertools import combinations, combinations_with_replacement\n# from itertools import accumulate # accumulate(iter[, f])\n# from functools import reduce # reduce(f, iter[, init])\n# from functools import lru_cache # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)\n# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).\n# from copy import deepcopy # to copy multi-dimentional matrix without reference\n# from fractions import gcd # for Python 3.4 (previous contest @AtCoder)\n\n\ndef main():\n mod = 1000000007 # 10^9+7\n inf = float(\'inf\') # sys.float_info.max = 1.79...e+308\n # inf = 2 ** 64 - 1 # (for fast JIT compile in PyPy) 1.84...e+19\n sys.setrecursionlimit(10**6) # 1000 -> 1000000\n def input(): return sys.stdin.readline().rstrip()\n def ii(): return int(input())\n def mi(): return map(int, input().split())\n def mi_0(): return map(lambda x: int(x)-1, input().split())\n def lmi(): return list(map(int, input().split()))\n def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))\n def li(): return list(input())\n \n \n class Eratos:\n def __init__(self, num):\n \n assert(num >= 1)\n self.table_max = num\n \n self.table = [False if i == 0 or i == 1 else True for i in range(num+1)]\n for i in range(2, int(math.sqrt(num)) + 1):\n if self.table[i]:\n for j in range(i ** 2, num + 1, i): \n self.table[j] = False\n \n def is_prime(self, num):\n \n assert(num >= 1)\n if num > self.table_max:\n raise ValueError(\'Eratos.is_prime(): exceed table_max({}). got {}\'.format(self.table_max, num))\n return self.table[num]\n \n def prime_factorize(self, num):\n \n assert(num >= 1)\n if int(math.sqrt(num)) > self.table_max:\n raise ValueError(\'Eratos.prime_factorize(): exceed prime table size. got {}\'.format(num))\n \n factorized_dict = dict()\n candidate_prime_numbers = [i for i in range(2, int(math.sqrt(num)) + 1) if self.is_prime(i)]\n \n \n for p in candidate_prime_numbers:\n if num == 1: \n break\n if num % p == 0:\n cnt = 0\n while num % p == 0:\n num //= p\n cnt += 1\n factorized_dict[p] = cnt\n if num != 1:\n factorized_dict[num] = 1\n return factorized_dict\n \n def enum_divisor(self, num):\n \n divisor_small = []\n divisor_large = []\n for i in range(1, int(math.sqrt(num)) + 1):\n if num % i == 0:\n divisor_small.append(i)\n if i != num // i:\n divisor_large.append(num // i)\n divisor_large.reverse()\n return divisor_small + divisor_large\n \n n = ii()\n e = Eratos(n)\n c = Counter()\n for i in range(2, n + 1):\n c += Counter(e.prime_factorize(i))\n # print(c)\n \n gt_74_candidate = 0\n gt_24_candidate = 0\n gt_14_candidate = 0\n gt_4_candidate = 0\n gt_2_candidate = 0\n for _, v in c.items():\n if v >= 2:\n gt_2_candidate += 1\n if v >= 4:\n gt_4_candidate += 1\n if v >= 14:\n gt_14_candidate += 1\n if v >= 24:\n gt_24_candidate += 1\n if v >= 74:\n gt_74_candidate += 1\n \n def calc_3_5_5(a, b):\n if a >= 3 and b >= 2:\n # bC2 * (a - 2)\n return (b * (b-1) // 2) * (a - 2)\n else:\n return 0\n \n def calc_5_15(a, b):\n if a >= 2 and b >= 1:\n # bC1 * (a - 1)\n return b * (a - 1)\n else:\n return 0\n \n def calc_3_25(a, b):\n if a >= 2 and b >= 1:\n # bC1 * (a - 1)\n return b * (a - 1)\n else:\n return 0\n \n def calc_75(a):\n if a >= 1:\n return a\n else:\n return 0\n\n\n def calc_all_75_num(gt_2_candidate, gt_4_candidate, gt_14_candidate, gt_24_candidate, gt_74_candidate):\n ans = 0\n ans += calc_3_5_5(gt_2_candidate, gt_4_candidate)\n # print(ans)\n ans += calc_5_15(gt_4_candidate, gt_14_candidate)\n # print(ans)\n ans += calc_3_25(gt_2_candidate, gt_24_candidate)\n # print(ans)\n ans += calc_75(gt_74_candidate)\n # print(ans)\n return ans\n \n print(calc_all_75_num(gt_2_candidate, gt_4_candidate, gt_14_candidate, gt_24_candidate, gt_74_candidate))\n\n\n\nif __name__ == "__main__":\n main()\n'] | ['Wrong Answer', 'Accepted'] | ['s764436650', 's660890866'] | [3444.0, 3444.0] | [24.0, 23.0] | [8054, 7937] |
p03213 | u497952650 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['\nimport numpy as np\n\ndef prime_factorize(N): \n exponent = 0\n while N%2 == 0:\n exponent += 1\n N //= 2\n if exponent: factorization = [[2,exponent]]\n else: factorization = []\n i=1\n while i*i <=N:\n i += 2\n if N%i: continue\n exponent = 0\n while N%i == 0:\n exponent += 1\n N //= i\n factorization.append([i,exponent])\n if N!= 1: factorization.append([N,1])\n assert N != 0, "zero"\n return factorization\n\nfactors = [0]*100\nN = int(input())\n\nfor i in range(1,N+1):\n for p,n in prime_factorize(i):\n factors[p] += n\n\nfactors = np.array(factors)\nov2 = len(factors[factors >= 2])\nov4 = len(factors[factors >= 4])\nov14 = len(factors[factors >= 14])\nov24 = len(factors[factors >= 24])\nov74 = len(factors[factors >= 74])\nprint(ov2,ov4,ov14,ov24)\nans = 0\n## 2*4*4\nans += (ov4-2)*(ov4)*(ov4-1)//2 + (ov2-ov4)*(ov4)*(ov4-1)//2\n\n## 14 * 4\nans += (ov4-ov14)*(ov14) + (ov14)*(ov14-1)\n\n## 24 * 2\nans += (ov2-ov24)*ov24 + (ov24)*(ov24-1)\n\n## 74\nans += ov74\n\nprint(ans)', '\nimport numpy as np\n\ndef prime_factorize(N): \n exponent = 0\n while N%2 == 0:\n exponent += 1\n N //= 2\n if exponent: factorization = [[2,exponent]]\n else: factorization = []\n i=1\n while i*i <=N:\n i += 2\n if N%i: continue\n exponent = 0\n while N%i == 0:\n exponent += 1\n N //= i\n factorization.append([i,exponent])\n if N!= 1: factorization.append([N,1])\n assert N != 0, "zero"\n return factorization\n\nfactors = [0]*100\nN = int(input())\n\nfor i in range(1,N+1):\n for p,n in prime_factorize(i):\n factors[p] += n\n\nfactors = np.array(factors)\nov2 = len(factors[factors >= 2])\nov4 = len(factors[factors >= 4])\nov14 = len(factors[factors >= 14])\nov24 = len(factors[factors >= 24])\nov74 = len(factors[factors >= 74])\nans = 0\n## 2*4*4\nans += (ov4-2)*(ov4)*(ov4-1)//2 + (ov2-ov4)*(ov4)*(ov4-1)//2\n\n## 14 * 4\nans += (ov4-ov14)*(ov14) + (ov14)*(ov14-1)\n\n## 24 * 2\nans += (ov2-ov24)*ov24 + (ov24)*(ov24-1)\n\n## 74\nans += ov74\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s658908023', 's610468453'] | [12436.0, 12408.0] | [151.0, 149.0] | [1086, 1061] |
p03213 | u511379665 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['n=int(input())\ne=[0]*(n+1)\nfor i in range(2,n+1):\n cur=i\n for j in range(2,i+1):\n while cuur%j==0:\n e[j]+=1\n cur//=j\ndef num(m):\n return len(list(filter(lambda x: x>=m-1,e)))\n\nprint(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)\n', 'n=int(input())\ne=[0]*(n+1)\nfor i in range(2,n+1):\n cur=i\n for j in range(2,i+1):\n e[j]+=1\n cur//=j\ndef num(m):\n return len(list(filter(lambda x: x>=m-1,e)))\n\nprint(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)\n', 'n=int(input())\ne=[0]*(n+1)\nfor i in range(2,n+1):\n cur=i\n for j in range(2,i+1):\n while cur%j==0:\n e[j]+=1\n cur//=j\ndef num(m):\n return len(list(filter(lambda x: x>=m-1,e)))\n\nprint(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s281167995', 's765700444', 's991854540'] | [3064.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0] | [300, 267, 299] |
p03213 | u530606147 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['n = int(input())\n\nimport math\n\n\ndef isPrime(x):\n if x == 2:\n return True\n if x % 2 == 0:\n return False\n for i in range(3, int(math.sqrt(x)) + 1, 2):\n if x % i == 0:\n return False\n return True\n\n\n\n# if isPrime(i):\n\n\n\nprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37,\n 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]\n\npows = {}\nfor p in primes:\n if p > n:\n break\n pows[p] = 0\n pp = p\n while n // pp >= 1:\n pows[p] += n // pp\n pp *= p\n\ne = []\nfor x in pows.values():\n e.append(x + 1)\nprint(e)\n\nimport itertools\nans = 0\n\nfor x in e:\n if x >= 75:\n ans += 1\n\nfor (x, y) in itertools.combinations(e, 2):\n #print(x, y)\n for a, b in [(25, 3), (15, 5), (5, 15), (3, 25)]:\n if x >= a and y >= b:\n ans += 1\n\nfor (x, y, z) in itertools.combinations(e, 3):\n \n for a, b, c in [[5, 5, 3], [5, 3, 5], [3, 5, 5]]:\n if x >= a and y >= b and z >= c:\n ans += 1\n\nprint(ans)\n', 'n = int(input())\n\n# import math\n# def isPrime(x):\n# if x == 2:\n# return True\n# if x % 2 == 0:\n# return False\n\n\n# return False\n# return True\n\n\n\n# if isPrime(i):\n\n\n\nprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37,\n 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]\n\npows = {}\nfor p in primes:\n if p > n:\n break\n pows[p] = 0\n pp = p\n while n // pp >= 1:\n pows[p] += n // pp\n pp *= p\n\ne = []\nfor x in pows.values():\n e.append(x + 1)\n# print(e)\n\nimport itertools\nans = 0\n\nfor x in e:\n if x >= 75:\n ans += 1\n\nfor (x, y) in itertools.combinations(e, 2):\n #print(x, y)\n for a, b in [(25, 3), (15, 5), (5, 15), (3, 25)]:\n if x >= a and y >= b:\n ans += 1\n\nfor (x, y, z) in itertools.combinations(e, 3):\n \n for a, b, c in [[5, 5, 3], [5, 3, 5], [3, 5, 5]]:\n if x >= a and y >= b and z >= c:\n ans += 1\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s329095427', 's302078079'] | [3064.0, 3064.0] | [20.0, 19.0] | [998, 1018] |
p03213 | u543954314 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['from collections import defaultdict as ddict\nd = ddict(int)\nfor i in range(1,n):\n for p in range(2,int(i**.5)+2):\n while i%p == 0:\n d[p] += 1\n i//=p\nf = [2,4,14,24,74]\ng = [0]*5\nfor x in d.values():\n for i in range(5):\n if x >= f[i]:\n g[i] += 1\n#3 5 5\n#3 25\n#15 5\n#75\nans = f[1]*(f[1]-1)*(f[0]-2) + f[3]*(f[0]-1) + f[2]*(f[1]-1) + f[4]\nprint(ans)', 'from collections import defaultdict as ddict\nd = ddict(int)\nn = int(input())\nfor i in range(1,n+1):\n for p in range(2,int(i**.5)+2):\n while i%p == 0:\n d[p] += 1\n i//=p\n if i>1:\n d[i] += 1\ng = [2,4,14,24,74]\nf = [0]*5\nfor x in d.values():\n for i in range(5):\n if x >= g[i]:\n f[i] += 1\nans = f[1]*(f[1]-1)//2*(f[0]-2) + f[3]*(f[0]-1) + f[2]*(f[1]-1) + f[4]\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s245083712', 's617643995'] | [3316.0, 3316.0] | [21.0, 21.0] | [369, 392] |
p03213 | u580258754 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['000', 'N = int(input())\n\npn=[2];A=100\nfor L in range(3,A):\n chk=True\n for L2 in pn:\n if L%L2 == 0:chk=False\n if chk==True:pn.append(L)\n\nmul = [0 for i in range(101)]\nfor i in range(1,N+1):\n for j in pn:\n if j > i:\n break\n temp = i\n while True:\n if temp%j == 0:\n temp /= j\n mul[j] += 1\n continue\n else:\n break\n \nprime_num = []\nfor index, num in enumerate(mul):\n if num != 0:\n prime_num.append([index,num])\n\nprint(prime_num)\nans = 0\n\nfrom itertools import combinations\nnums442 = list(combinations(prime_num,3))\nfor num in nums442:\n if num[0][1]>=2 and num[1][1]>=4 and num[2][1]>=4:\n ans += 1\n if num[0][1]>=4 and num[1][1]>=2 and num[2][1]>=4:\n ans += 1\n if num[0][1]>=4 and num[1][1]>=4 and num[2][1]>=2:\n ans += 1\n\n\nnums14_4 = list(combinations(prime_num,2))\nfor num in nums14_4:\n if num[0][1]>=14 and num[1][1]>=4:\n ans += 1\n if num[0][1]>=4 and num[1][1]>=14:\n ans += 1\n\n\nnums24_2 = list(combinations(prime_num,2))\nfor num in nums24_2:\n if num[0][1]>=24 and num[1][1]>=2:\n ans += 1\n if num[0][1]>=2 and num[1][1]>=24:\n ans += 1\n \n\nfor num in prime_num:\n if num[0] >= 74:\n ans += 1\n \nprint(ans)', 'N = int(input())\n\npn=[2];A=100\nfor L in range(3,A):\n chk=True\n for L2 in pn:\n if L%L2 == 0:chk=False\n if chk==True:pn.append(L)\n\nmul = [0 for i in range(101)]\nfor i in range(1,N+1):\n for j in pn:\n if j > i:\n break\n temp = i\n while True:\n if temp%j == 0:\n temp /= j\n mul[j] += 1\n continue\n else:\n break\n \nprime_num = []\nfor index, num in enumerate(mul):\n if num != 0:\n prime_num.append([index,num])\n\nans = 0\n\nfrom itertools import combinations\nnums442 = list(combinations(prime_num,3))\nfor num in nums442:\n if num[0][1]>=2 and num[1][1]>=4 and num[2][1]>=4:\n ans += 1\n if num[0][1]>=4 and num[1][1]>=2 and num[2][1]>=4:\n ans += 1\n if num[0][1]>=4 and num[1][1]>=4 and num[2][1]>=2:\n ans += 1\n\n\nnums14_4 = list(combinations(prime_num,2))\nfor num in nums14_4:\n if num[0][1]>=14 and num[1][1]>=4:\n ans += 1\n if num[0][1]>=4 and num[1][1]>=14:\n ans += 1\n\n\nnums24_2 = list(combinations(prime_num,2))\nfor num in nums24_2:\n if num[0][1]>=24 and num[1][1]>=2:\n ans += 1\n if num[0][1]>=2 and num[1][1]>=24:\n ans += 1\n \n\nfor num in prime_num:\n if num[1] >= 74:\n ans += 1\n \nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s202017283', 's850599872', 's231291458'] | [2940.0, 3188.0, 3188.0] | [17.0, 21.0, 20.0] | [3, 1280, 1263] |
p03213 | u589432040 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['N = int(input())\nimport itertools\n\nl = []\nfor i in range(2,N+1):\n l.append(divisor_pl(i))\nl = sum(l,[])\nl.sort()\n\nfac_dict = {}\nfac_list = []\nfor key, value in itertools.groupby(l):\n fac_dict[str(key)] = len(list(value))\n fac_list.append(key)\n\ncount = 0\n\nexp_list = []\nfor l in itertools.combinations(fac_list,3):\n a = []\n for i in range(3):\n a.append(fac_dict[str(l[i])])\n exp_list.append(a)\n\nfor l in exp_list:\n if all(i>=2 for i in l) and sum(i>=4 for i in l) >=2:\n count += 1\n\n\nexp_list = []\nfor l in itertools.combinations(fac_list,2):\n a = []\n for i in range(2):\n a.append(fac_dict[str(l[i])])\n exp_list.append(a)\n\nfor l in exp_list:\n if all(i>=4 for i in l) and sum(i>=14 for i in l) >=1:\n count += 1\n\n\nexp_list = []\nfor l in itertools.combinations(fac_list,2):\n a = []\n for i in range(2):\n a.append(fac_dict[str(l[i])])\n exp_list.append(a)\n\nfor l in exp_list:\n if all(i>=2 for i in l) and sum(i>=24 for i in l) >=1:\n count += 1\n\n\nexp_list = []\nfor l in fac_list:\n exp_list.append(fac_dict[str(l)])\n\nfor l in exp_list:\n if l >= 74:\n count += 1\nprint(count)', 'N = int(input())\nimport itertools\n\ndef divisor_pl(num):\n l = []\n i = 2\n while num > 1:\n if num%i == 0:\n l.append(i)\n num = int(num/i)\n else:\n i += 1\n if num != 1:\n l.append(num)\n return l\n\nl = []\nfor i in range(2,N+1):\n l.append(divisor_pl(i))\nl = sum(l,[])\nl.sort()\n\nfac_dict = {}\nfac_list = []\nfor key, value in itertools.groupby(l):\n fac_dict[str(key)] = len(list(value))\n fac_list.append(key)\n\ncount = 0\n\nfor l in itertools.combinations(fac_list,3):\n for i in range(3):\n if fac_dict[str(l[i%3])] >= 4 and fac_dict[str(l[(i+1)%3])] >= 4 and fac_dict[str(l[(i+2)%3])] >= 2:\n count+=1\n\n\nfor l in itertools.combinations(fac_list,2):\n for i in range(2):\n if fac_dict[str(l[i%2])] >= 14 and fac_dict[str(l[(i+1)%2])] >= 4:\n count+=1\n\n\nfor l in itertools.combinations(fac_list,2):\n for i in range(2):\n if fac_dict[str(l[i%2])] >= 24 and fac_dict[str(l[(i+1)%2])] >= 2:\n count+=1\n\n\nfor l in fac_list:\n if fac_dict[str(l)] >= 74:\n count += 1\n\nprint(count)\n'] | ['Runtime Error', 'Accepted'] | ['s185743901', 's677998164'] | [3188.0, 3064.0] | [18.0, 24.0] | [1262, 1201] |
p03213 | u593005350 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['N=int(input())\n\ndef IsPrime(A):\n prime=[2]\n for a in range(3,A+1):\n for p in prime:\n if a%p==0:\n break\n else:\n prime.append(a)\n return prime\n\n\nprime=IsPrime(N)\n\npcount={}\nfor p in prime:\n pcount[p]=0\nfor nn in range(2,N+1):\n for p in prime:\n n=nn\n if n<p:\n break\n while n%p==0:\n n//=p\n pcount[p]+=1\n#print(pcount)\nmcount={}\nfor i in [75,25,15,5,3]:\n mcount[i]=0\nfor p in prime:\n for i in [75,25,15,5,3]:\n if pcount[p]>=i-1:\n mcount[i]+=1\nprint(mcount)\nprint(mcount[75]+\\\n mcount[25]*(mcount[3]-1)+\\\n mcount[15]*(mcount[5]-1)+\\\n mcount[5]*(mcount[5]-1)//2*(mcount[3]-2))\n#75/25*3/15*5/5*5*3\n', 'N=int(input())\n\ndef IsPrime(A):\n prime=[2]\n for a in range(3,A+1):\n for p in prime:\n if a%p==0:\n break\n else:\n prime.append(a)\n return prime\n\n\nprime=IsPrime(N)\n\npcount={}\nfor p in prime:\n pcount[p]=0\nfor nn in range(2,N+1):\n for p in prime:\n n=nn\n if n<p:\n break\n while n%p==0:\n n//=p\n pcount[p]+=1\n#print(pcount)\nmcount={}\nfor i in [75,25,15,5,3]:\n mcount[i]=0\nfor p in prime:\n for i in [75,25,15,5,3]:\n if pcount[p]>=i-1:\n mcount[i]+=1\n#print(mcount)\nprint(mcount[75]+\\\n mcount[25]*(mcount[3]-1)+\\\n mcount[15]*(mcount[5]-1)+\\\n mcount[5]*(mcount[5]-1)//2*(mcount[3]-2))\n#75/25*3/15*5/5*5*3\n'] | ['Wrong Answer', 'Accepted'] | ['s223978297', 's426775841'] | [3064.0, 3064.0] | [18.0, 18.0] | [768, 769] |
p03213 | u599170882 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['N = int(input())\n\nelem = [0 for _ in range(N+1)]\n\nfor i in range(1, N+1):\n cur = i\n for j in range(1, i+1):\n while cur % j == 0:\n elem[j] += 1\n cur //= j\n\ndef num(m):\n return len(list(filter(lambda x: x >= m-1, elem)))\n\nprint(num(75) + num(25)*(num(3)-1) + num(15)*(num(3)-1) + num(5)*(num(5)-1)*(num(3)-2) // 2)\n', 'N = int(input())\n\nelem = [0 for _ in range(N+1)]\n\nfor i in range(1, N+1):\n cur = i\n for j in range(2, i+1):\n while cur % j == 0:\n elem[j] += 1\n cur //= j\n\ndef num(m):\n return len(list(filter(lambda x: x >= m-1, elem)))\n\nprint(num(75) + num(25)*(num(3)-1) + num(15)*(num(5)-1) + num(5)*(num(5)-1)*(num(3)-2) // 2)\n'] | ['Time Limit Exceeded', 'Accepted'] | ['s103713269', 's424730445'] | [3064.0, 3064.0] | [2104.0, 19.0] | [352, 352] |
p03213 | u600402037 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['N = int(input())\ne = [0] * (N+1)\n\nfor i in range(2, N+1):\n cur = i\n for j in range(2, i+1):\n while cur % j == 0:\n e[j] += 1\n cur //= j\n\ndef num(m): \n return len(list(filter(lambda x: x >= m-1, e)))\n\nanswer = num(75) + num(25) * (num(3)-1) + num(15) * (num(5) - 1)\n + num(5) * (num(5) - 1) * (num(3) - 2) // 2)', '# coding: utf-8\nimport sys\n\nsr = lambda: sys.stdin.readline().rstrip()\nir = lambda: int(sr())\nlr = lambda: list(map(int, sr().split()))\n\nN = ir()\nexp = [0] * (N+1)\nfor i in range(2, N+1):\n cur = i\n for p in range(2, i+1):\n while cur % p == 0:\n exp[p] += 1\n cur //= p\n\ndef num(x):\n \n return len(list(filter(lambda y: y >= x-1, exp)))\n\nanswer = num(75) + num(25) * (num(3)-1) + num(15) * (num(5)-1)\\\n + num(5) * (num(5)-1) * (num(3)-2) // 2\nprint(answer)\n'] | ['Runtime Error', 'Accepted'] | ['s744186832', 's076424225'] | [3064.0, 3064.0] | [17.0, 18.0] | [400, 540] |
p03213 | u607865971 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['import sys\nimport collections\nfrom collections import Counter\n# from collections import deque\n# from collections import defaultdict\nimport itertools\n# from itertools import accumulate\n# from itertools import permutations\n# from itertools import combinations\n# from itertools import takewhile\n# from itertools import compress\n# import functools\n# from functools import reduce\nimport math\n# from math import gcd\n# from math import inf\n# from math import ceil\n# from math import floor\n# from math import log10\n# from math import log2\n# from math import log\nfrom math import factorial\n\n# import re\n\nN = int(input())\n\n\ndef prime_decomposition(n):\n i = 2\n table = []\n while i * i <= n:\n while n % i == 0:\n n //= i\n table.append(i)\n i += 1\n if n > 1:\n table.append(n)\n return table\n\n\nP = prime_decomposition(factorial(N))\nC = Counter(P)\n\nn2, n4, n14, n24, n74 = [0] * 5\n\nfor k, v in C.items():\n n2 += 1 if v >= 2 else 0\n n4 += 1 if v >= 4 else 0\n n14 += 1 if v >= 14 else 0\n n24 += 1 if v >= 24 else 0\n n74 += 1 if v >= 74 else 0\n\np1, p2, p3, p4 = [0] * 4\np1 = n4 * (n4 - 1) * (n2 - 1) // 2\np2 = n14 * (n14 - 1)\np3 = n74\np4 = n24 * (n24 - 1)\n\nprint(sum([p1, p2, p3, p4]))\n\n', 'import sys\nimport collections\nfrom collections import Counter\n# from collections import deque\n# from collections import defaultdict\nimport itertools\n# from itertools import accumulate\n# from itertools import permutations\n# from itertools import combinations\n# from itertools import takewhile\n# from itertools import compress\n# import functools\n# from functools import reduce\nimport math\n# from math import gcd\n# from math import inf\n# from math import ceil\n# from math import floor\n# from math import log10\n# from math import log2\n# from math import log\nfrom math import factorial\n\n# import re\n\nN = int(input())\n\n\ndef prime_decomposition(n):\n i = 2\n table = []\n while i * i <= n:\n while n % i == 0:\n n //= i\n table.append(i)\n i += 1\n if n > 1:\n table.append(n)\n return table\n\n\nP = prime_decomposition(factorial(N))\nC = Counter(P)\n\nn2, n4, n14, n24, n74 = [0] * 5\n\nfor k, v in C.items():\n n2 += 1 if v >= 2 else 0\n n4 += 1 if v >= 4 else 0\n n14 += 1 if v >= 14 else 0\n n24 += 1 if v >= 24 else 0\n n74 += 1 if v >= 74 else 0\n\np1, p2, p3, p4 = [0] * 4\np1 = n4 * (n4 - 1) * (n2 - 2) // 2\np2 = n14 * (n4 - 1)\np3 = n74\np4 = n24 * (n2 - 1)\n\nprint(sum([p1, p2, p3, p4]))\n'] | ['Wrong Answer', 'Accepted'] | ['s279226134', 's291102986'] | [3828.0, 3316.0] | [68.0, 21.0] | [1239, 1236] |
p03213 | u620866522 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['n = int(input())\na = []\n\ndef judge(x):\n y = x\n for i in range(2,x):\n kk = y % i\n if i*i > x:\n return 1\n if kk == 0:\n return 0\n return 1\n\ndef solve(prime,x):\n cnt = 0\n while x:\n cnt += x//prime\n x //= prime\n return cnt\n\nfor i in range(2,n):\n if judge(i):\n a.append(i)\nans = 0\nif n <= 9:\n ans = 0\nelse:\n ll = len(a)\n a2 = 0\n a4 = 0\n a14 = 0\n a24 = 0\n a74 = 0\n for i in range(ll):\n kk = solve(a[i],n)\n if kk >=2:\n a2 += 1\n if kk >=4:\n a4 += 1\n if kk >=14:\n a14 += 1\n if kk >=24:\n a24 += 1\n if kk >=74:\n a74 += 1\n print(a4*(a4-1)//2*(a2-2)+a14*(a4-1)+a24*(a2-1)+a74)', 'n=int(input())\nd=dict()\nfor m in range(1,n+1):\n while m>1:\n for i in range(2,int(m**0.5)+1):\n if m%i==0:break\n else:i=m\n d[i]=d.get(i,0)+1\n m/=i\ndef num(n):\n return len(list(filter(lambda x:x>=n,d.values())))\n\nprint(num(74)+ num(24)*(num(2)-1)+ num(14)*(num(4)-1)+ num(4)*(num(4)-1)*(num(2)-2)//2)'] | ['Wrong Answer', 'Accepted'] | ['s048214117', 's711228978'] | [3064.0, 3188.0] | [18.0, 20.0] | [771, 342] |
p03213 | u633105820 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ["def run(N):\n \n \n primes = {1: 1}\n for i in range(2, N+1):\n tmp = i\n for j in range(2, N+1):\n while tmp%j == 0:\n if j in primes.keys():\n primes[j] += 1\n else:\n primes[j] = 1\n tmp /= j\n print(primes)\n cnt = 0\n\n # (74,0,0)\n for i in primes.values():\n if i >= 74:\n cnt += 1\n\n # (2,4,4)\n cnt4 = 0\n cnt2 = 0\n for i in primes.values():\n if i >= 4:\n cnt4 += 1\n if i >= 2:\n cnt2 += 1\n if cnt4 >= 2:\n cnt += (cnt4*(cnt4-1)//2)*(cnt2-2)\n\n # (24,2,0)\n cnt24 = 0\n cnt2 = 0\n for i in primes.values():\n if i >= 24:\n cnt24 += 1\n if i >= 2:\n cnt2 += 1\n if cnt24 >= 1:\n cnt += cnt24*(cnt2-1)\n\n # (14,4,0)\n cnt14 = 0\n cnt4 = 0\n for i in primes.values():\n if i >= 14:\n cnt14 += 1\n if i >= 4:\n cnt4 += 1\n if cnt14 >= 1:\n cnt += cnt14*(cnt4-1)\n return cnt\n\n\ndef main():\n N = int(input())\n print(run(N))\n\n\nif __name__ == '__main__':\n main()", "def run(N):\n \n \n primes = {1: 1}\n for i in range(2, N+1):\n tmp = i\n for j in range(2, N+1):\n while tmp%j == 0:\n if j in primes.keys():\n primes[j] += 1\n else:\n primes[j] = 1\n tmp /= j\n cnt = 0\n\n # (74,0,0)\n for i in primes.values():\n if i >= 74:\n cnt += 1\n\n # (2,4,4)\n cnt4 = 0\n cnt2 = 0\n for i in primes.values():\n if i >= 4:\n cnt4 += 1\n if i >= 2:\n cnt2 += 1\n if cnt4 >= 2:\n cnt += (cnt4*(cnt4-1)//2)*(cnt2-2)\n\n # (24,2,0)\n cnt24 = 0\n cnt2 = 0\n for i in primes.values():\n if i >= 24:\n cnt24 += 1\n if i >= 2:\n cnt2 += 1\n if cnt24 >= 1:\n cnt += cnt24*(cnt2-1)\n\n # (14,4,0)\n cnt14 = 0\n cnt4 = 0\n for i in primes.values():\n if i >= 14:\n cnt14 += 1\n if i >= 4:\n cnt4 += 1\n if cnt14 >= 1:\n cnt += cnt14*(cnt4-1)\n return cnt\n\n\ndef main():\n N = int(input())\n print(run(N))\n\n\nif __name__ == '__main__':\n main()"] | ['Wrong Answer', 'Accepted'] | ['s324083595', 's845779434'] | [3188.0, 3064.0] | [20.0, 19.0] | [1202, 1186] |
p03213 | u645250356 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ["from collections import Counter,defaultdict,deque\nfrom heapq import heappop,heappush\nfrom bisect import bisect_left,bisect_right \nimport sys,math,itertools,fractions,pprint\nsys.setrecursionlimit(10**8)\nmod = 10**9+7\nINF = float('inf')\ndef inp(): return int(sys.stdin.readline())\ndef inpl(): return list(map(int, sys.stdin.readline().split()))\n\ndef conb(n,r): \n if n<r: return 0\n return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))\ndef prime_factorize(n):\n if n == 1:\n return [1]\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\n\nn = inp()\nd = defaultdict(int)\nfor i in range(1,n+1):\n for x in prime_factorize(i):\n d[x] += 1\n\nvalist = d.values()\nc = [2,4,14,24,74]\ncnt = [0] * 5\nfor x in valist:\n if x >= 74: cnt[4] += 1\n elif x >= 24: cnt[3] += 1\n elif x >= 14: cnt[2] += 1\n elif x >= 4: cnt[1] += 1\n elif x >= 2: cnt[0] += 1\nprint(cnt)\nres = 0\na = sum(cnt[1:]); b = cnt[0]\nres += conb(a,3) + conb(a,2)*b\na = sum(cnt[2:]); b = cnt[1]\nres += conb(a,2) + a*b\na = sum(cnt[3:]); b = sum(cnt[:3])\nres += conb(a,2) + a*b\nres += cnt[4]\nprint(res)", "from collections import Counter,defaultdict,deque\nfrom heapq import heappop,heappush\nfrom bisect import bisect_left,bisect_right \nimport sys,math,itertools,fractions,pprint\nsys.setrecursionlimit(10**8)\nmod = 10**9+7\nINF = float('inf')\ndef inp(): return int(sys.stdin.readline())\ndef inpl(): return list(map(int, sys.stdin.readline().split()))\n\ndef conb(n,r): \n if n<r: return 0\n return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))\ndef prime_factorize(n):\n if n == 1:\n return [1]\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\n\nn = inp()\nd = defaultdict(int)\nfor i in range(1,n+1):\n for x in prime_factorize(i):\n d[x] += 1\n\nvalist = d.values()\nc = [2,4,14,24,74]\ncnt = [0] * 5\nfor x in valist:\n if x >= 74: cnt[4] += 1\n elif x >= 24: cnt[3] += 1\n elif x >= 14: cnt[2] += 1\n elif x >= 4: cnt[1] += 1\n elif x >= 2: cnt[0] += 1\n# print(cnt)\nres = 0\na = sum(cnt[1:]); b = cnt[0]\nres += conb(a,3)*3 + conb(a,2)*b\na = sum(cnt[2:]); b = cnt[1]\nres += a*(a-1) + a*b\na = sum(cnt[3:]); b = sum(cnt[:3])\nres += a*(a-1) + a*b\nres += cnt[4]\nprint(res)\n"] | ['Wrong Answer', 'Accepted'] | ['s574026919', 's758716030'] | [10492.0, 10500.0] | [41.0, 39.0] | [1300, 1301] |
p03213 | u681917640 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ["def find_prime_factor(num):\n if num & 1 == 0:\n return 2\n for i in range(3, int(num ** (1 / 2)) + 1):\n if num % i == 0:\n return i\n return num\n\n\ndef prime_factorization(num):\n subtract = num\n result = []\n while subtract > 1:\n factor = find_prime_factor(subtract)\n result.append(factor)\n subtract //= factor\n return result\n\n\nn = int(input())\n\n# prime and prime's power.\npower = {}\nfor i in range(1, n + 1):\n for prime in prime_factorization(i):\n if prime in power:\n power[prime] += 1\n else:\n power[prime] = 1\n\ncount75 = 0\ncount25 = 0\ncount15 = 0\ncount5 = 0\ncount3 = 0\nfor count in power.values():\n if count >= 74:\n count75 += 1\n elif count >= 24:\n count25 += 1\n elif count >= 14:\n count15 += 1\n elif count >= 4:\n count5 += 1\n elif count >= 2:\n count3 += 1\n\nprint(count75, count25, count15, count5, count3)\n\nsum25 = count75 + count25\nsum15 = count75 + count25 + count15\nsum5 = count75 + count25 + count15 + count5\nsum3 = count75 + count25 + count15 + count5 + count3\nans = count75 + sum25 * (sum3 - 1) + sum15 * (sum5 - 1) + (sum5 * (sum5 - 1) * (sum3 - 2)) // 2\n\nprint(ans)", "def find_prime_factor(num):\n if num & 1 == 0:\n return 2\n for i in range(3, int(num ** (1 / 2)) + 1):\n if num % i == 0:\n return i\n return num\n\n\ndef prime_factorization(num):\n subtract = num\n result = []\n while subtract > 1:\n factor = find_prime_factor(subtract)\n result.append(factor)\n subtract //= factor\n return result\n\n\nn = int(input())\n\n# prime and prime's power.\npower = {}\nfor i in range(1, n + 1):\n for prime in prime_factorization(i):\n if prime in power:\n power[prime] += 1\n else:\n power[prime] = 1\n\ncount75 = sum(1 for count in power.values() if count >= 74)\ncount25 = sum(1 for count in power.values() if count >= 24)\ncount15 = sum(1 for count in power.values() if count >= 14)\ncount5 = sum(1 for count in power.values() if count >= 4)\ncount3 = sum(1 for count in power.values() if count >= 2)\n\nans = count75 \\\n + count25 * (count3 - 1) \\\n + count15 * (count5 - 1) \\\n + (count5 * (count5 - 1) * (count3 - 2)) // 2\n\nprint(ans)\n"] | ['Wrong Answer', 'Accepted'] | ['s294271234', 's037434100'] | [3188.0, 3188.0] | [18.0, 18.0] | [1226, 1056] |
p03213 | u686036872 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['N = int(input())\n\nn = [0]*(N+1)\nfor i in range(2, N+1):\n for j in range(2, i+1):\n while i%j == 0:\n i//=j\n n[j] += 1\n\ndef num(m):\nreturn len(list(filter(lambda x: x>=m-1, n)))\n\nprint(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)', 'N = int(input())\n\nn = [0]*(N+1)\nfor i in range(2, N+1):\n for j in range(2, i+1):\n while i%j == 0:\n i//=j\n n[j] += 1\n\ndef num(m):\n return len(list(filter(lambda x: x>=m-1, n)))\n\nprint(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)', 'N = int(input())\n\nn = [0]*(N+1)\nfor i in range(2, N+1):\n for j in range(2, i+1):\n while i%j == 0:\n i//=j\n n[j] += 1\n\ndef num(m):\nreturn len(list(filter(lambda x: x>=m-1, e)))\n\nprint(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)', 'N = int(input())\n\nn = [0]*(N+1)\nfor i in range(2, N+1):\n x = i\n for j in range(2, i+1):\n while x%j == 0:\n x//=j\n n[j] += 1\n\ndef num(m):\nreturn len(list(filter(lambda x: x>=m-1, n)))\n\nprint(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)14+num(5)*(num(5)-1)*(num(3)-2)//2)', 'N = int(input())\n\nn = [0]*(N+1)\nfor i in range(2, N+1):\n for j in range(2, i+1):\n while i%j == 0:\n i//=j\n n[j] += 1\n\ndef num(m):\n return len(list(filter(lambda x: x>=m-1, n)))\n\nprint(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s036851008', 's324715580', 's353066511', 's858426978', 's678085231'] | [2940.0, 3060.0, 2940.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 18.0] | [294, 298, 294, 304, 296] |
p03213 | u690536347 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['from collections import defaultdict as dd\nfrom itertools import permutations as p\n\ndef factorize(n):\n d = dd(int)\n for i in range(2, int(n**0.5)+1):\n while n%i==0:\n d[i] += 1\n n //= i\n if not n:\n break\n if n>1:\n d[n] += 1\n return d\n\nN = int(input())\nd = defaultdict(int)\nfor i in range(1, N+1):\n e = factorize(i)\n for i,j in e.items():\n d[i] += j\n\nans = 0\nfor i, j, k in p(d.values(), 3): \n if i>=2 and j>=4 and k>=4:\n ans += 1\nans //= 2\n\nfor i, j in p(d.values(), 2):\n if i>=2 and j>=24:\n ans += 1\n if i>=4 and j>=14:\n ans += 1\n\nfor i in d.values():\n if i>=74:\n ans += 1\n\nprint(ans)', 'from collections import Counter as c\n\ndef fact(n):\n d=[]\n for i in range(2,int(n**0.5)+2):\n while n%i==0:\n n//=i\n d.append(i)\n if n!=1:d.append(n)\n return c(d)\n\nn=int(input())\nd=c()\nfor i in range(1,n+1):\n d+=fact(i)\n\nf=lambda n,x:sum(1 for i in p(d.values(),n) if all(map(lambda x,y:x>=y,i,x)))\nprint(f(3,(2,4,4))//2+f(2,(2,24))+f(2,(4,14))+f(1,(74,)))', 'from collections import defaultdict, Counter\nfrom itertools import permutations as p\n\ndef factorize(n):\n d = defaultdict(int)\n for i in range(2, int(n**0.5)+1):\n while n%i==0:\n d[i] += 1\n n //= i\n if not n:\n break\n if n>1:\n d[n] += 1\n return d\n\nN = int(input())\nd = Counter()\nfor i in range(1, N+1):\n d += factorize(i)\nvl = d.values()\n\nans = sum(1 for i, j, k in p(vl, 3) if i>=2 and j>=4 and k>=4)//2\nans += sum(1 for i, j in p(vl, 2) if i>=2 and j>=24)\nans += sum(1 for i, j in p(vl, 2) if i>=4 and j>=14)\nans += sum(1 for i in vl if i>=74)\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s531546088', 's767446284', 's098030072'] | [3316.0, 3316.0, 3316.0] | [21.0, 22.0, 22.0] | [705, 397, 622] |
p03213 | u692746605 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['n = int(input())\nf=list()\n\nfor i in range(1,n+1):\n b=2\n while b*b <= i:\n while i%b==0:\n i //= b\n f.append(b)\n b += 1\n if i > 1:\n f.append(i)\n\no2=o4=0\n\nfor i in range(2,n+1):\n d=f.count(i)\n if d>=2:\n o2 += 1\n if d>=4:\n o4 += 1\n if d:\n print(i,d)\n\nprint(o4*(o4-1)//2*(o2-2))', 'n = int(input())\nf=list()\n\nfor i in range(1,n+1):\n b=2\n while b*b <= i:\n while i%b==0:\n i //= b\n f.append(b)\n b += 1\n if i > 1:\n f.append(i)\n\no2=o3=o4=o14=o24=o74=0\n\nfor i in range(2,n+1):\n d=f.count(i)\n if d>=2:\n o2 += 1\n if d>=4:\n o4 += 1\n if d>=14:\n o14 += 1\n if d>=24:\n o24 += 1\n if d>=74:\n o74 += 1\n\nprint(o4*(o4-1)//2*(o2-2)+o14*(o4-1)+o24*(o2-1)+o74)'] | ['Wrong Answer', 'Accepted'] | ['s876071433', 's378940809'] | [3064.0, 3064.0] | [18.0, 18.0] | [307, 400] |
p03213 | u724732842 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['def era(n):\n table = [0] * (n + 1)\n prime_list = []\n \n for i in range(2, n + 1):\n if table[i] == 0:\n prime_list.append(i)\n for j in range(2*i, n + 1, i):\n table[j] = 1\n \n return prime_list\n\ndef f(n):\n cnt = 0\n for i in data:\n if i[1] >= n-1:\n cnt += 1\n return cnt\n \nN = int(input())\ns = era(N)\ndata = []\n \nfor i in s:\n k = i\n c = 0\n while N // k >= 1:\n c += N // k\n k = k*i\n print(c,k)\n \n data.append([i,c])\n \n\nprint(f(75)+f(15)*(f(5)-1)+f(25)*(f(3)-1)+f(5)*(f(5)-1)*(f(3)-2)//2)', 'def era(n):\n table = [0] * (n + 1)\n prime_list = []\n \n for i in range(2, n + 1):\n if table[i] == 0:\n prime_list.append(i)\n for j in range(2*i, n + 1, i):\n table[j] = 1\n \n return prime_list\n\n\nN = int(input())\ns = era(N)\ndata = []\n\nfor i in s:\n k = i\n c = 0\n while N // k >= 1:\n c += N // k\n k = k*i\n print(c,k)\n\n data.append([i,c])\n\ncnt = 0\nL = len(data)\nprint(data)\n#2,4,4\nfor i in range(L-2):\n for j in range(i+1,L-1):\n for k in range(j+1,L):\n if (data[i][1] >= 4)and(data[j][1] >= 4)and(data[k][1] >= 2):\n print(data[i][1],data[j][1],data[k][1])\n cnt += 1\nprint(cnt)\n#4,14\nfor i in range(L-1):\n for j in range(i+1,L):\n if (data[i][1] >= 14)and(data[j][1] >= 4):\n print(data[i][1],data[j][1])\n cnt += 1\nprint(cnt)\n#2,24\nfor i in range(L-1):\n for j in range(i+1,L):\n if (data[i][1] >= 24)and(data[j][1] >= 2):\n print(data[i][1],data[j][1])\n cnt += 1\nprint(cnt)\n#74\nfor i in range(L):\n if data[i][1] >= 74:\n print(data[i][1])\n cnt+=1\n\nprint(cnt)\n', 'def era(n):\n table = [0] * (n + 1)\n prime_list = []\n \n for i in range(2, n + 1):\n if table[i] == 0:\n prime_list.append(i)\n for j in range(2*i, n + 1, i):\n table[j] = 1\n \n return prime_list\n\ndef f(n):\n cnt = 0\n for i in data:\n if i[1] >= n-1:\n cnt += 1\n return cnt\n \nN = int(input())\ns = era(N)\ndata = []\n \nfor i in s:\n k = i\n c = 0\n while N // k >= 1:\n c += N // k\n k = k*i\n \n data.append([i,c])\n \n\nprint(f(75)+f(15)*(f(5)-1)+f(25)*(f(3)-1)+f(5)*(f(5)-1)*(f(3)-2)//2)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s562684183', 's910607914', 's932701682'] | [3064.0, 3316.0, 3064.0] | [17.0, 19.0, 17.0] | [601, 1172, 582] |
p03213 | u735069283 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['import collections\n\ndef prime_factorize(n):\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\n\nN = int(input())\nPrime=[]\nfor i in range(2,N+1):\n Prime +=prime_factorize(i)\n \nc=collections.Counter(Prime)\nP_count=c.values()\n\ncount_2=len([1 for x in P_count if x>=2])\ncount_4=len([1 for x in P_count if x>=4])\ncount_14=len([1 for x in P_count if x>=14])\ncount_24=len([1 for x in P_count if x>=24])\ncount_74=len([1 for x in P_count if x>=74])\nanswer=(count_2-1)*(count_4-1)*count_4//2+count_4*count_14+(count_2-1)*count_24+count_74\nprint(answer)', 'import collections\n\ndef prime_factorize(n):\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\n\nN = int(input())\nPrime=[]\nfor i in range(2,N+1):\n Prime +=prime_factorize(i)\n \nc=collections.Counter(Prime)\nP_count=c.values()\n\ncount_2=len([1 for x in P_count if x>=2])\ncount_4=len([1 for x in P_count if x>=4])\ncount_14=len([1 for x in P_count if x>=14])\ncount_24=len([1 for x in P_count if x>=24])\ncount_74=len([1 for x in P_count if x>=74])\nanswer=(count_2-2)*(count_4-1)*count_4//2+(count_4-1)*count_14+(count_2-1)*count_24+count_74\nprint(answer)'] | ['Wrong Answer', 'Accepted'] | ['s639180375', 's180460056'] | [3316.0, 3316.0] | [21.0, 21.0] | [742, 746] |
p03213 | u736729525 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['\nfrom math import sqrt, ceil\n\nprimes = [2]\nfor n in range(3, 101):\n if any(n % i == 0 for i in range(2, n)):\n continue\n primes.append(n)\n\ndef fact(n):\n p = 1\n for i in range(2, n+1):\n p *= i\n return p\n\ndef calc_factors(n):\n factors = {}\n for p in primes:\n while n % p == 0:\n factors[p] = factors.get(p, 0)+1\n n //= p\n return factors\n\ndef solve(N):\n n = fact(N)\n factors = calc_factors(n)\n\n nums = {}\n for p, c in factors.items():\n if c >= 2:\n nums[3] = nums.get(3,0)+1\n if c >= 4:\n nums[5] = nums.get(5,0)+1\n if c >= 14:\n nums[15] = nums.get(15,0)+1\n if c >= 24:\n nums[25] = nums.get(25,0)+1\n if c >= 74:\n nums[75] = nums.get(75,0)+1\n print(sum([\n nums[5] * (nums[5] - 1) * (nums[3]-2) // 2,\n nums[15] * (nums[5] - 1) ,\n nums[25] * (nums[3] - 1) ,\n nums[75] ]))\nN = int(input())\nsolve(N)\n', '\nfrom math import sqrt, ceil\n\nprimes = [2]\nfor n in range(3, 101):\n if any(n % i == 0 for i in range(2, n)):\n continue\n primes.append(n)\n\ndef fact(n):\n p = 1\n for i in range(2, n+1):\n p *= i\n return p\n\ndef calc_factors(n):\n factors = {}\n for p in primes:\n while n % p == 0:\n factors[p] = factors.get(p, 0)+1\n n //= p\n return factors\n\ndef solve(N):\n n = fact(N)\n factors = calc_factors(n)\n print("fact(%d)=%d" % (N, n))\n print("factors=", factors)\n #print("factors=", calc_factors(32400))\n print((2**8)*(3**4)*(5**2)*7)\n\n nums = {}\n for p, c in factors.items():\n if c >= 2:\n nums[3] = nums.get(3,0)+1\n if c >= 4:\n nums[5] = nums.get(5,0)+1\n if c >= 14:\n nums[15] = nums.get(15,0)+1\n if c >= 24:\n nums[25] = nums.get(25,0)+1\n if c >= 74:\n nums[75] = nums.get(75,0)+1\n print(sum([\n nums[5] * (nums[5] - 1) * (nums[3]-2) // 2,\n nums[15] * (nums[5] - 1) ,\n nums[25] * (nums[3] - 1) ,\n nums[75] ]))\nN = int(input())\nsolve(N)\n', '\nfrom math import sqrt, ceil\n\nprimes = [2]\nfor n in range(3, 101):\n if any(n % i == 0 for i in range(2, n)):\n continue\n primes.append(n)\n\ndef fact(n):\n p = 1\n for i in range(2, n+1):\n p *= i\n return p\n\ndef calc_factors(n):\n factors = {}\n for p in primes:\n while n % p == 0:\n factors[p] = factors.get(p, 0)+1\n n //= p\n return factors\n\ndef solve(N):\n n = fact(N)\n factors = calc_factors(n)\n\n nums = {3:0,5:0,15:0,25:0,75:0}\n for p, c in factors.items():\n if c >= 2:\n nums[3] = nums.get(3,0)+1\n if c >= 4:\n nums[5] = nums.get(5,0)+1\n if c >= 14:\n nums[15] = nums.get(15,0)+1\n if c >= 24:\n nums[25] = nums.get(25,0)+1\n if c >= 74:\n nums[75] = nums.get(75,0)+1\n print(sum([\n nums[5] * (nums[5] - 1) * (nums[3]-2) // 2,\n nums[15] * (nums[5] - 1) ,\n nums[25] * (nums[3] - 1) ,\n nums[75] ]))\nN = int(input())\nsolve(N)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s235132702', 's745136841', 's063653049'] | [3064.0, 3064.0, 3192.0] | [20.0, 18.0, 18.0] | [1004, 1147, 1026] |
p03213 | u746206084 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['n = int(input())\nlis=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]\nli=[]\na=0\nb=0\nc=0\nd=0\ne=0\nfor i in range(15):\n p=n\n q=0\n while(p>0):\n q+=p//lis[i]\n p=p//lis[i]\n if q>=74:\n e+=1\n if q>=24:\n print(lis[i])\n a+=1\n if q>=14:\n print(lis[i])\n b+=1\n if q>=4:\n print(lis[i])\n c+=1\n if q>=2:\n print(lis[i])\n d+=1\nans=a*(d-1)+b*(c-1)+(c*(c-1))//2*(d-2)+e\nprint(ans)', 'n = int(input())\nlis=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]\nli=[]\na=0\nb=0\nc=0\nd=0\ne=0\nfor i in range(15):\n p=n\n q=0\n while(p>0):\n q+=p//lis[i]\n p=p//lis[i]\n if q>=74:\n e+=1\n if q>=24:\n a+=1\n if q>=14:\n b+=1\n if q>=4:\n c+=1\n if q>=2:\n d+=1\nans=a*(d-1)+b*(c-1)+(c*(c-1))//2*(d-2)+e\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s549360135', 's279458768'] | [3064.0, 3064.0] | [17.0, 17.0] | [455, 367] |
p03213 | u767664985 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['from collections import Counter\n\ndef prime_factorize(n):\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\n\ndef multiply_primes(a, b):\n \n res = Counter([])\n keys = a.keys() | b.keys()\n for k in keys:\n res[k] = a[k] + b[k]\n return res\n\nN = int(input())\n\n\n\nf = Counter([]) \nfor n in range(2, N+1):\n f = multiply_primes(f, Counter(prime_factorize(n)))\n\nprint(f)\n\ncand2 = [item for item in f.items() if (item[1] >= 2)] \ncand4 = [item for item in f.items() if (item[1] >= 4)] \n\nprint(cand2, cand4)\n\n\nans = (len(cand4) * (len(cand4)-1))//2 * (len(cand2) - 2)\nprint(ans)\n', 'from collections import Counter\n\ndef prime_factorize(n):\n a = []\n while n % 2 == 0:\n a.append(2)\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n a.append(f)\n n //= f\n else:\n f += 2\n if n != 1:\n a.append(n)\n return a\n\ndef multiply_primes(a, b):\n \n res = Counter([])\n keys = a.keys() | b.keys()\n for k in keys:\n res[k] = a[k] + b[k]\n return res\n\nN = int(input())\n\n\n\n\n\n\n\n\nf = Counter([]) \nfor n in range(2, N+1):\n f = multiply_primes(f, Counter(prime_factorize(n)))\n\nc2, c4, c14, c24, c74 = 0, 0, 0, 0, 0\n\nfor item in f.items():\n k = item[1]\n c2 += (k >= 2)\n c4 += (k >= 4)\n c14 += (k >= 14)\n c24 += (k >= 24)\n c74 += (k >= 74)\n\nans_2_4_4 = (c4 * (c4 - 1))//2 * (c2 - 2)\nans_74 = c74\nans_2_24 = c24 * (c2 - 1)\nans_4_14 = c14 * (c4 - 1)\n\nans = ans_2_4_4 + ans_74 + ans_2_24 + ans_4_14\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s754745739', 's912486369'] | [3436.0, 3316.0] | [23.0, 23.0] | [1219, 1306] |
p03213 | u784022244 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['N=int(input())\n\n\nfrom operator import mul\nfrom functools import reduce\n\ndef cmb(n,r):\n r = min(n-r,r)\n if r == 0: return 1\n over = reduce(mul, range(n, n - r, -1))\n under = reduce(mul, range(1,r + 1))\n return over // under\n\n\nfrom collections import defaultdict\ndef factorization(n):\n arr = []\n temp = n\n for i in range(2, int(-(-n**0.5//1))+1):\n if temp%i==0:\n cnt=0\n while temp%i==0:\n cnt+=1\n temp //= i\n arr.append([i, cnt])\n\n if temp!=1:\n arr.append([temp, 1])\n\n if arr==[]:\n arr.append([n, 1])\n\n return arr\n\ncount=1\nD=defaultdict(int)\nfor i in range(1,N+1):\n f=factorization(i)\n for t in f:\n num,con=t\n D[num]+=con\nthrees=0\nfives=0\nnum_15=0\nnum_25=0\nnum_75=0\n\nfor v in D.values():\n if v>=2:\n threes+=1\n if v>=4:\n fives+=1\n if v>=14:\n num_15+=1\n if v>=24:\n num_25+=1\n if v>=74:\n num_75+=1\n#3*5*5\nans=(threes-fives)*fives*(fives-1)//2\nif fives>=3:\n ans+=cmb(fives, 3)\n#75*1\nans+=num_75+(N-num_75)+num_75*(num_75-1)//2\n#5*15\nans+=(fives-num_15)*(num_15-num_75)+(num_15-num_75)*(num_15-num_75)//2\n#3*25\nans+=(threes-num_15)*(num_25-num_75)+(num_25-num_75)*(num_25-num_75)//2\nprint(ans)\n#print(D)\n#print(threes, fives, num_15, num_25, num_75)\n#print(factorization(32400))', 'N=int(input())\n\n\n\nfrom operator import mul\nfrom functools import reduce\n\ndef cmb(n,r):\n r = min(n-r,r)\n if r == 0: return 1\n over = reduce(mul, range(n, n - r, -1))\n under = reduce(mul, range(1,r + 1))\n return over // under\n\n\nfrom collections import defaultdict\ndef factorization(n):\n arr = []\n temp = n\n for i in range(2, int(-(-n**0.5//1))+1):\n if temp%i==0:\n cnt=0\n while temp%i==0:\n cnt+=1\n temp //= i\n arr.append([i, cnt])\n\n if temp!=1:\n arr.append([temp, 1])\n\n if arr==[]:\n arr.append([n, 1])\n\n return arr\n\ncount=1\nD=defaultdict(int)\nfor i in range(1,N+1):\n f=factorization(i)\n for t in f:\n num,con=t\n D[num]+=con\nthrees=0\nfives=0\nnum_15=0\nnum_25=0\nnum_75=0\n\nfor v in D.values():\n if v>=2:\n threes+=1\n if v>=4:\n fives+=1\n if v>=14:\n num_15+=1\n if v>=24:\n num_25+=1\n if v>=74:\n num_75+=1\n#3*5*5\nans=(threes-fives)*fives*(fives-1)//2\nif fives>=3:\n #ans+=cmb(fives, 3)\n ans+=fives*(fives-1)*(fives-2)//2\n#75*1\n\nans+=num_75\n#5*15\n\nans+=num_15*(fives-1)\n#3*25\nans+=num_25*(threes-1)\nprint(ans)\n#print(D)\n#print(threes, fives, num_15, num_25, num_75)\n#print(factorization(32400))'] | ['Wrong Answer', 'Accepted'] | ['s259324986', 's301869617'] | [3572.0, 3684.0] | [23.0, 23.0] | [1360, 1272] |
p03213 | u787456042 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['import math\nfrom collections import Counter\nfrom scipy.misc import comb\nn = int(input())\n\ndef primes(m) :\n ps = [2]\n for i in range(3, m) :\n for p in ps :\n if i%p == 0 :\n break\n else :\n ps.append(i)\n return ps\n\ndef fdivisor(m) :\n ps = primes(m)\n df = {p:0 for p in ps}\n for i in range(1, m+1) :\n ii = i\n while ii != 1 :\n for p in ps :\n if ii%p == 0 :\n df[p] += 1\n ii //= p\n return df\n\nans = 0\ndf = fdivisor(n)\nover2 = len([v for v in df.values() if v >= 2])\nover4 = len([v for v in df.values() if v >= 4])\nover14 = len([v for v in df.values() if v >= 14])\nover24 = len([v for v in df.values() if v >= 24])\nover74 = len([v for v in df.values() if v >= 74])\nans += comb(over4, 2, exact=True)*comb(over2-2, 1)\nans += comb(over14, 1)*comb(over4-1, 1)\nans += comb(over24, 1)*comb(over2-1, 1)\nans += comb(over74, 1)\n\nprint(int(ans))', 'import math\nfrom collections import Counter\nfrom scipy.misc import comb\nn = int(input())\n\ndef primes(m) :\n ps = [2]\n for i in range(3, m) :\n for p in ps :\n if i%p == 0 :\n break\n else :\n ps.append(i)\n return ps\n\ndef fdivisor(m) :\n ps = primes(m)\n df = {p:0 for p in ps}\n for i in range(1, m+1) :\n ii = i\n while ii != 1 :\n for p in ps :\n if ii%p == 0 :\n df[p] += 1\n ii //= p\n return df\n\nans = 0\ndf = fdivisor(n)\nover2 = len([v for v in df.values() if v >= 2])\nover4 = len([v for v in df.values() if v >= 4])\nover14 = len([v for v in df.values() if v >= 14])\nover24 = len([v for v in df.values() if v >= 24])\nover74 = len([v for v in df.values() if v >= 74])\nans += comb(over4, 2)*comb(over2-2, 1)\nans += comb(over14, 1)*comb(over4-1, 1)\nans += comb(over24, 1)*comb(over2-1, 1)\nans += comb(over74, 1)\n\nprint(int(ans))', 'n = int(input())\n\ndef primes(m) :\n ps = [2]\n for i in range(3, m+1) :\n for p in ps :\n if i%p == 0 :\n break\n else :\n ps.append(i)\n return ps\n\ndef fdivisor(m) :\n ps = primes(m)\n df = {p:0 for p in ps}\n for i in range(1, m+1) :\n ii = i\n while ii != 1 :\n for p in ps :\n if ii%p == 0 :\n df[p] += 1\n ii //= p\n return df\n\nans = 0\ndf = fdivisor(n)\nover2 = len([v for v in df.values() if v >= 2])\nover4 = len([v for v in df.values() if v >= 4])\nover14 = len([v for v in df.values() if v >= 14])\nover24 = len([v for v in df.values() if v >= 24])\nover74 = len([v for v in df.values() if v >= 74])\nans += over4*(over4-1)//2*(over2-2)\nans += over14*(over4-1)\nans += over24*(over2-1)\nans += over74\n\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s222203471', 's768293744', 's683667817'] | [24644.0, 15256.0, 3444.0] | [2109.0, 2109.0, 21.0] | [976, 964, 845] |
p03213 | u807772568 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['def cmb(n, r):\n if n - r < r: r = n - r\n if r == 0: return 1\n if r == 1: return n;\n\n numerator = [n - r + k + 1 for k in range(r)]\n denominator = [k + 1 for k in range(r)]\n\n for p in range(2,r+1):\n pivot = denominator[p - 1]\n if pivot > 1:\n offset = (n - r) % p;\n for k in range(p-1,r,p):\n numerator[k - offset] /= pivot\n denominator[k] /= pivot\n\n result = 1\n for k in range(r):\n if numerator[k] > 1:\n result *= int(numerator[k])\n\n return result;\n\na = int(input())\n\nb = [0 for i in range(15)]\nj = 0\nc = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]\nd = [0 for i in range(101)]\np = 0\npp = 0\ng = 0\ngg = 0\nggg = 0\nco = 0\nfor i in range(1,101):\n k = i\n while True:\n if k % c[j] == 0 and k >= c[j]:\n b[j] += 1\n k //= c[j]\n else:\n j += 1\n if j == 15:\n j = 0\n break\n for k in range(15):\n if b[k] >= 74:\n g += 1\n if b[k] >= 24:\n gg += 1\n if b[k] >= 14:\n ggg += 1\n if b[k] >= 4:\n p += 1\n if b[k] >= 2:\n pp += 1\n print(g,gg,ggg,p,pp)\n if i >= 10:\n d[i] = cmb(p, 2)*cmb((pp-2), 1) + cmb(g, 1) + cmb(gg, 1)*cmb((pp-1), 1) + cmb(ggg, 1)*cmb((p-1), 1)\n p = 0\n pp = 0\n g = 0\n gg = 0\n ggg = 0\nprint(d)', 'def cmb(n, r):\n if n - r < r: r = n - r\n if n <= 0: return 0\n if r == 0: return 1\n if r == 1: return n\n\n numerator = [n - r + k + 1 for k in range(r)]\n denominator = [k + 1 for k in range(r)]\n\n for p in range(2,r+1):\n pivot = denominator[p - 1]\n if pivot > 1:\n offset = (n - r) % p;\n for k in range(p-1,r,p):\n numerator[k - offset] //= pivot\n denominator[k] //= pivot\n\n result = 1\n for k in range(r):\n if numerator[k] > 1:\n result *= int(numerator[k])\n\n return result\n\na = int(input())\n\nb = [0 for i in range(15)]\nj = 0\nc = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]\nd = [0 for i in range(101)]\np = 0\npp = 0\ng = 0\ngg = 0\nggg = 0\nco = 0\nfor i in range(1,101):\n k = i\n while True:\n if k % c[j] == 0 and k >= c[j]:\n b[j] += 1\n k //= c[j]\n else:\n j += 1\n if j == 15:\n j = 0\n break\n for k in range(15):\n if b[k] >= 74:\n g += 1\n if b[k] >= 24:\n gg += 1\n if b[k] >= 14:\n ggg += 1\n if b[k] >= 4:\n p += 1\n if b[k] >= 2:\n pp += 1\n if i >= 10:\n d[i] = cmb(p, 2)*cmb((pp-2), 1) + cmb(g, 1) + cmb(gg, 1)*cmb((pp-1), 1) + cmb(ggg, 1)*cmb((p-1), 1)\n p = 0\n pp = 0\n g = 0\n gg = 0\n ggg = 0\nprint(d[a])\n'] | ['Wrong Answer', 'Accepted'] | ['s674621128', 's097419846'] | [3192.0, 3192.0] | [20.0, 19.0] | [1286, 1291] |
p03213 | u826263061 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['# -*- coding: utf-8 -*-\n"""\nCreated on Sun Dec 2 21:50:38 2018\nABC114D\n@author: maezawa\n"""\n\nnmax = int(100)\nis_prime = [True]*(nmax+1)\n\nis_prime[0] = False\nis_prime[1] = False\n\nfor i in range(2, nmax//2):\n if is_prime[i] == True:\n for j in range(2*i,nmax+1,i):\n is_prime[j] = False\n\nprime_numbers = [i for i in range(nmax+1) if is_prime[i]]\n\nn = int(input())\n\nprime_exps = [0]*len(prime_numbers)\nfor i in range(2,n+1):\n for k, p in enumerate(prime_numbers):\n if i<p:\n break\n while i>=p:\n if i%p == 0:\n i = i // p\n prime_exps[k] += 1\n else:\n break\n\nprint(prime_numbers)\nprint(prime_exps)\nans = 0\n\ncnt74 = 0\n# searching >=74\nfor i in prime_exps:\n if i>=74:\n cnt74 += 1\n\n# searching 24 and 2:\ncnt24 = 0\ncnt24_2 = 0\nfor i in prime_exps:\n if i>=24:\n cnt24 += 1\n if i>=2:\n cnt24_2 += 1\n\n# searching 4 and 2:\ncnt44 = 0\ncnt44_2 = 0\nfor i in prime_exps:\n if i>=4:\n cnt44 += 1\n if i>=2:\n cnt44_2 += 1\n\ncnt = cnt74\nif cnt24 > 0 and cnt24_2 > 1:\n cnt += cnt24*(cnt24_2-1)\nif cnt44 > 1 and cnt44_2 > 2:\n cnt += cnt44*(cnt44-1)//2*(cnt44_2-2)\n \nprint(cnt)\n', '# -*- coding: utf-8 -*-\n"""\nCreated on Sun Dec 2 21:50:38 2018\nABC114D\n@author: maezawa\n"""\n\nnmax = int(100)\nis_prime = [True]*(nmax+1)\n\nis_prime[0] = False\nis_prime[1] = False\n\nfor i in range(2, nmax//2):\n if is_prime[i] == True:\n for j in range(2*i,nmax+1,i):\n is_prime[j] = False\n\nprime_numbers = [i for i in range(nmax+1) if is_prime[i]]\n\nn = int(input())\n\nprime_exps = [0]*len(prime_numbers)\nfor i in range(2,n+1):\n for k, p in enumerate(prime_numbers):\n if i<p:\n break\n while i>=p:\n if i%p == 0:\n i = i // p\n prime_exps[k] += 1\n else:\n break\n\n\n\nans = 0\n\ncnt74 = 0\ncnt24 = 0\ncnt14 = 0\ncnt4 = 0\ncnt2 = 0\n\n# searching >=74\nfor i in prime_exps:\n if i>=74:\n cnt74 += 1\n if i>=24:\n cnt24 += 1\n if i>=14:\n cnt14 += 1\n if i>=4:\n cnt4 += 1\n if i>=2:\n cnt2 += 1\n\ncnt = cnt74\nif cnt24 > 0 and cnt2 > 1:\n cnt += cnt24*(cnt2-1)\nif cnt14 > 0 and cnt4 > 1:\n cnt += cnt14*(cnt4-1)\nif cnt4 > 1 and cnt2 > 2:\n cnt += cnt4*(cnt4-1)//2*(cnt2-2)\n \nprint(cnt)\n'] | ['Wrong Answer', 'Accepted'] | ['s698936076', 's581083302'] | [3064.0, 3064.0] | [19.0, 18.0] | [1219, 1162] |
p03213 | u846150137 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['from collections import Counter\nimport math\ndef P(n, r):\n return math.factorial(n)//math.factorial(n-r)\ndef C(n, r):\n return P(n, r)//math.factorial(r)\nn=int(input())\nL=[]\nfor j in range(2,n+1):\n I=j\n s=0\n R=int(I)\n while s==0:\n for i in range(2,R+1):\n if I%i==0:\n I=I/i\n if I==1:\n s=1\n L.append(i)\n break\nc=Counter(L)\nc=[0 for i in range(100)]\nfor i,j in c.most_common():\n c[j]+=1\n \ns=0\ns+=sum(c[4:])*(sum(c[4:])-1)*sum(c[2:]-2)//2\ns+=sum(c[14:])*(sum(c[4:])-1)\ns+=sum(c[24:])*(sum(c[2:])-1)\ns+=sum(c[74:])\nprint(s)', 'from collections import Counter\nimport math\ndef P(n, r):\n return math.factorial(n)//math.factorial(n-r)\ndef C(n, r):\n return P(n, r)//math.factorial(r)\nn=int(input())\nL=[]\nfor j in range(2,n+1):\n I=j\n s=0\n R=int(I)\n while s==0:\n for i in range(2,R+1):\n if I%i==0:\n I=I/i\n if I==1:\n s=1\n L.append(i)\n break\nC=Counter(L)\nc=[0 for i in range(100)]\nfor i,j in C.most_common():\n c[j]+=1\n \ns=0\ns+=sum(c[4:])*(sum(c[4:])-1)*(sum(c[2:])-2)//2\ns+=sum(c[14:])*(sum(c[4:])-1)\ns+=sum(c[24:])*(sum(c[2:])-1)\ns+=sum(c[74:])\nprint(s)'] | ['Runtime Error', 'Accepted'] | ['s241510301', 's818199664'] | [3316.0, 3316.0] | [23.0, 21.0] | [628, 630] |
p03213 | u901098617 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['def isprime(n):\n if(n<2):\n return False\n for i in range(2,n):\n if(n%i==0):\n return False\n return True\n\ndef primelist(n):\n return [i for i in range(n) if isprime(i)]\n\ndef factor(n):\n f = {}\n while(n > 1):\n for p in primelist(n+1):\n if(n % p == 0):\n f[p] = f.get(p, 0) + 1\n n //= p\n return f\n\ndef factorfactorial(n):\n f = {}\n for i in range(1,n+1):\n fi = factor(i)\n for k, v in fi.items():\n f[k] = f.get(k,0) + v\n return f\n\n# 75 = 3*5*5 = 3*25 = 5*15 \nn = int(input())\nf = factorfactorial(n)\n\nprint(f)\ncnt = 0\n\n\nfor i in primelist(n+1):\n if(f[i]>75):\n cnt += 1\n for j in primelist(n+1):\n if(i==j):\n continue\n if(f[i]>=25-1 and f[j]>=3-1):\n cnt += 1\n if(f[i]>=15-1 and f[j]>=5-1):\n cnt += 1\n if(i > j):\n for k in primelist(n+1):\n if k in [i,j]:\n continue\n if(f[i]>=5-1 and f[j]>=5-1 and f[k]>=3-1):\n cnt += 1\n\n\n\nprint(cnt)\n', 'def isprime(n):\n if(n<2):\n return False\n for i in range(2,n):\n if(n%i==0):\n return False\n return True\n\ndef primelist(n):\n return [i for i in range(n) if isprime(i)]\n\ndef factor(n):\n f = {}\n while(n > 1):\n for p in primelist(n+1):\n if(n % p == 0):\n f[p] = f.get(p, 0) + 1\n n //= p\n return f\n\ndef factorfactorial(n):\n f = {}\n for i in range(1,n+1):\n fi = factor(i)\n for k, v in fi.items():\n f[k] = f.get(k,0) + v\n return f\n\n# 75 = 3*5*5 = 3*25 = 5*15 \nn = int(input())\nf = factorfactorial(n)\n\n# print(f)\ncnt = 0\n\nfor i in f.keys():\n if(f[i]>=75-1):\n cnt += 1\n for j in primelist(n+1):\n if(i==j):\n continue\n if(f[i]>=25-1 and f[j]>=3-1):\n cnt += 1\n if(f[i]>=15-1 and f[j]>=5-1):\n cnt += 1\n if(i > j):\n for k in primelist(n+1):\n if k in [i,j]:\n continue\n if(f[i]>=5-1 and f[j]>=5-1 and f[k]>=3-1):\n cnt += 1\n\n\n\nprint(cnt)\n'] | ['Wrong Answer', 'Accepted'] | ['s151725581', 's185559055'] | [3064.0, 3064.0] | [63.0, 63.0] | [1124, 1099] |
p03213 | u903596281 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['prime=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]\nprint(len(prime))', 'prime=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]\ns=[0 for i in range(15)]\nN=int(input())\nfor i in range(15):\n j=1\n while N//(prime[i]**j)>0:\n s[i]+=N//(prime[i]**j)\n j+=1\no3,o5,o15,o25,o75=0,0,0,0,0\nfor item in s:\n if item>=2:\n o3+=1\n if item>=4:\n o5+=1\n if item>=14:\n o15+=1\n if item>=24:\n o25+=1\n if item>=74:\n o75+=1\nans=[0,0,0,0]\nif o75>0:\n ans[0]+=1\nif o25>0:\n ans[1]+=o25*(o3-1)\nif o15>0:\n ans[2]+=o15*(o5-1)\nif o5>1 and o3>2:\n ans[3]+=o5*(o5-1)//2*(o3-2)\nprint(sum(ans))\n'] | ['Wrong Answer', 'Accepted'] | ['s845422312', 's461651817'] | [2940.0, 3064.0] | [18.0, 19.0] | [96, 550] |
p03213 | u905582793 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['from collections import defaultdict\n\nN = int(input())\nprime = [2,3,5,7,11,13,17,19,23,29,31,37,41,\n 43,47,53,59,61,67,71,73,79,83,89,97]\nans = 0\nfactor = defaultdict(int)\nfor i in range(1,N+1):\n for j in prime:\n while i != 1:\n if i % j == 0:\n factor[j] += 1\n i = i // j\n else:\n break\n\nfact_l = list(dict(factor).items())\nfor i, x in enumerate(fact_l):\n if x[1] >= 74:\n n_74 = i + 1\n if x[1] >= 24:\n n_24 = i + 1\n if x[1] >= 14:\n n_14 = i + 1\n if x[1] >= 4:\n n_4 = i + 1\n if x[1] >= 2:\n n_2 = i + 1\n\nprint(n_74+n_24*(n_2-1)+n_14*(n_4-1)+n_4*(n_4-1)*(n_2-2)//2)', 'from collections import defaultdict\n\nN = int(input())\nprime = [2,3,5,7,11,13,17,19,23,29,31,37,41,\n 43,47,53,59,61,67,71,73,79,83,89,97]\nans = 0\nfactor = defaultdict(int)\nfor i in range(1,N+1):\n for j in prime:\n while i != 1:\n if i % j == 0:\n factor[j] += 1\n i = i // j\n else:\n break\n\nfact_l = list(dict(factor).items())\nfact_l.sort()\nn_74 = 0\nn_24 = 0\nn_14 = 0\nn_4 = 0\nn_2 = 0\nfor i, x in enumerate(fact_l):\n if x[1] >= 74:\n n_74 = i + 1\n if x[1] >= 24:\n n_24 = i + 1\n if x[1] >= 14:\n n_14 = i + 1\n if x[1] >= 4:\n n_4 = i + 1\n if x[1] >= 2:\n n_2 = i + 1\n\nprint(n_74+(n_24*(n_2-1))+(n_14*(n_4-1))+(n_4*(n_4-1)*(n_2-2)//2))'] | ['Runtime Error', 'Accepted'] | ['s376508170', 's892544171'] | [3316.0, 3316.0] | [21.0, 21.0] | [693, 756] |
p03213 | u941753895 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['# sl=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]\n# _l=[0],*25\n\n\n# for j in range(len(sl)):\n# a=i\n# while True:\n# if a%sl[j]==0:\n# l[i-1][j]+=1\n# a//=sl[j]\n# else:\n# break\n\n\n# for j in range(25):\n# l2[i][j]+=l[i][j]\n# l2[i+1][j]=l2[i][j]\n\n# print(l2[i])\n\nsl=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]\nl=[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[4, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[7, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[7, 4, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[8, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[8, 4, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[10, 5, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[10, 5, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[11, 5, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[11, 6, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[15, 6, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[15, 6, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[16, 8, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[16, 8, 3, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[18, 8, 4, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[18, 9, 4, 3, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[19, 9, 4, 3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[19, 9, 4, 3, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[22, 10, 4, 3, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[22, 10, 6, 3, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[23, 10, 6, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[23, 13, 6, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[25, 13, 6, 4, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[25, 13, 6, 4, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[26, 14, 7, 4, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[26, 14, 7, 4, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[31, 14, 7, 4, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[31, 15, 7, 4, 3, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[32, 15, 7, 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[32, 15, 8, 5, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[34, 17, 8, 5, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[34, 17, 8, 5, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[35, 17, 8, 5, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[35, 18, 8, 5, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[38, 18, 9, 5, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[38, 18, 9, 5, 3, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[39, 19, 9, 6, 3, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[39, 19, 9, 6, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[41, 19, 9, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[41, 21, 10, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[42, 21, 10, 6, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[42, 21, 10, 6, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[46, 22, 10, 6, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[46, 22, 10, 8, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[47, 22, 12, 8, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[47, 23, 12, 8, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[49, 23, 12, 8, 4, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[49, 23, 12, 8, 4, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[50, 26, 12, 8, 4, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[50, 26, 13, 8, 5, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[53, 26, 13, 9, 5, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[53, 27, 13, 9, 5, 4, 3, 3, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[54, 27, 13, 9, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n[54, 27, 13, 9, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0],\n[56, 28, 14, 9, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0],\n[56, 28, 14, 9, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],\n[57, 28, 14, 9, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],\n[57, 30, 14, 10, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],\n[63, 30, 14, 10, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],\n[63, 30, 15, 10, 5, 5, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],\n[64, 31, 15, 10, 6, 5, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],\n[64, 31, 15, 10, 6, 5, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],\n[66, 31, 15, 10, 6, 5, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],\n[66, 32, 15, 10, 6, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],\n[67, 32, 16, 11, 6, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],\n[67, 32, 16, 11, 6, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0],\n[70, 34, 16, 11, 6, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0],\n[70, 34, 16, 11, 6, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0],\n[71, 34, 16, 11, 6, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0],\n[71, 35, 18, 11, 6, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0],\n[73, 35, 18, 11, 6, 5, 4, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0],\n[73, 35, 18, 12, 7, 5, 4, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0],\n[74, 36, 18, 12, 7, 6, 4, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0],\n[74, 36, 18, 12, 7, 6, 4, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0],\n[78, 36, 19, 12, 7, 6, 4, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0],\n[78, 40, 19, 12, 7, 6, 4, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0],\n[79, 40, 19, 12, 7, 6, 4, 4, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0],\n[79, 40, 19, 12, 7, 6, 4, 4, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],\n[81, 41, 19, 13, 7, 6, 4, 4, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],\n[81, 41, 20, 13, 7, 6, 5, 4, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],\n[82, 41, 20, 13, 7, 6, 5, 4, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],\n[82, 42, 20, 13, 7, 6, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],\n[85, 42, 20, 13, 8, 6, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0],\n[85, 42, 20, 13, 8, 6, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],\n[86, 44, 21, 13, 8, 6, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],\n[86, 44, 21, 14, 8, 7, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],\n[88, 44, 21, 14, 8, 7, 5, 4, 4, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],\n[88, 45, 21, 14, 8, 7, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],\n[89, 45, 21, 14, 8, 7, 5, 4, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],\n[89, 45, 22, 14, 8, 7, 5, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],\n[94, 46, 22, 14, 8, 7, 5, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],\n[94, 46, 22, 14, 8, 7, 5, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n[95, 46, 22, 16, 8, 7, 5, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n[95, 48, 22, 16, 9, 7, 5, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n[95, 48, 22, 16, 9, 7, 5, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]\nn=int(input())\nfor i in l[n-1]:', 'import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,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 LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]\ndef I(): return int(sys.stdin.readline())\ndef LS(): return sys.stdin.readline().split()\ndef S(): return input()\n\n# Factoring by trial split\ndef getPrimeList(n):\n l=[]\n t=int(math.sqrt(n))+1\n \n for a in range(2,t):\n while n%a==0:\n n//=a\n l.append(a)\n \n if n!=1:\n l.append(n)\n \n return l\n\n# Summarize count of factor within list\ndef summarize_list(l):\n sl=sorted(l)\n\n a=sl[0]\n c=1\n res=[]\n\n for x in sl[1:]:\n if x==a:\n c+=1\n else:\n res.append([a,c])\n a=x\n c=1\n res.append([a,c])\n\n return res\n\n# nCr\ndef nCr(n,r):\n if n<r:\n return 0\n return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ndef main():\n n=I()\n\n if n==1:\n return 0\n\n l1=[]\n for i in range(2,n+1):\n l1+=getPrimeList(i)\n\n l1=summarize_list(l1)\n\n l1=sorted(l1,key=lambda x:x[1],reverse=True)\n\n # print(l1)\n\n # print(l)\n\n ans=[]\n\n \n l2=[0]*5\n for x in l1:\n if x[1]>=74:\n l2[0]+=1\n elif x[1]>=24:\n l2[1]+=1\n elif x[1]>=14:\n l2[2]+=1\n elif x[1]>=4:\n l2[3]+=1\n elif x[1]>=2:\n l2[4]+=1\n\n # print(l2)\n\n # 75\n ans.append(l2[0])\n\n \n ans.append(sum(l2[:2])*(sum(l2[:5])-1))\n\n \n ans.append(sum(l2[:3])*(sum(l2[:4])-1))\n\n \n ans.append(nCr(sum(l2[:4]),2)*(sum(l2[:5])-2))\n\n return sum(ans)\n\n# main()\nprint(main())\n'] | ['Runtime Error', 'Accepted'] | ['s596576826', 's343848196'] | [4728.0, 5464.0] | [21.0, 44.0] | [8541, 2775] |
p03213 | u965346773 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['N, M = map(int,input().split())\n\nfor i in range(1,M+1):\n if M%i == 0:\n if M//i >= N:\n ans = i\n else:\n break\n \nprint(ans)', 'import math\nN = int(input())\n\np = [i for i in range(2,N+1)]\nq = []\n\nfor i in p:\n for j in range(2,i):\n if i%j==0:\n q.append(i)\n break\n \np = list(set(p)-set(q))\n\ndef div(n):\n ret=0\n a=math.factorial(N)\n while a%n == 0:\n a//=n\n ret+=1\n return ret\n\nAns=0\n\nfor n in p:\n if div(n)>=74:\n Ans+=1\n\nfor n in p:\n if div(n)>=24:\n for m in p:\n if div(m)>=2 and n!=m:\n Ans += 1\n\n \nfor n in p:\n if div(n)>=14:\n for m in p:\n if div(m)>=4 and n!=m:\n Ans += 1\n\nfor n in p:\n if div(n)>=2:\n for m in p:\n if n!=m and div(m)>=4:\n for l in p:\n if l!=n and l>m and div(l)>=4:\n Ans +=1\n\nprint(Ans)'] | ['Runtime Error', 'Accepted'] | ['s741220631', 's348362309'] | [2940.0, 3064.0] | [18.0, 31.0] | [163, 805] |
p03213 | u994521204 | 2,000 | 1,048,576 | You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there? Here, a Shichi-Go number is a positive integer that has exactly 75 divisors. | ['from collections import defaultdict\nn=int(input())\nsosu_list=[2]\nfor i in range(3, 101, 2):\n flag=0\n for j in range(2, int(i**0.5)+2):\n if i%j==0:\n flag=1\n if flag==0:\n sosu_list.append(i)\nprint(sosu_list)\nsoinsu=defaultdict(int)\nfor i in sosu_list:\n temp=n\n while temp>=i:\n temp//=i\n soinsu[i]+=temp\nkouho=soinsu.values()\ncnt3=0\ncnt5=0\ncnt15=0\ncnt25=0\ncnt75=0\nfor a in kouho:\n if a>=2:\n cnt3+=1\n if a>=4:\n cnt5+=1\n if a>=14:\n cnt15+=1\n if a>=24:\n cnt25+=1\n if a>=74:\n cnt75+=1\nans=0\nans+=cnt75\nans+=cnt15*(cnt5-1)\nans+=cnt25*(cnt3-1)\nif cnt3>=2:\n ans+=cnt5*(cnt5-1)*(cnt3-2)//2\n \nprint(ans)', 'from collections import defaultdict\nn=int(input())\nsosu_list=[2]\nfor i in range(3, 101, 2):\n flag=0\n for j in range(2, int(i**0.5)+2):\n if i%j==0:\n flag=1\n if flag==0:\n sosu_list.append(i)\nsoinsu=defaultdict(int)\nfor i in sosu_list:\n temp=n\n while temp>=i:\n temp//=i\n soinsu[i]+=temp\nkouho=soinsu.values()\ncnt3=0\ncnt5=0\ncnt15=0\ncnt25=0\ncnt75=0\nfor a in kouho:\n if a>=2:\n cnt3+=1\n if a>=4:\n cnt5+=1\n if a>=14:\n cnt15+=1\n if a>=24:\n cnt25+=1\n if a>=74:\n cnt75+=1\nans=0\nans+=cnt75\nans+=cnt15*(cnt5-1)\nans+=cnt25*(cnt3-1)\nif cnt3>=2:\n ans+=cnt5*(cnt5-1)*(cnt3-2)//2\n \nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s816718768', 's122725804'] | [3572.0, 3444.0] | [22.0, 23.0] | [705, 688] |
p03219 | u001041019 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y=map(int,input().split())\nprint(x+y/2)', 'x,y=map(int,input().split())\nprint(int(x+y/2))'] | ['Wrong Answer', 'Accepted'] | ['s898615385', 's797786323'] | [2940.0, 2940.0] | [17.0, 17.0] | [41, 46] |
p03219 | u003928116 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y=map(int,input().split())\nprint(x+y/2)', 'x,y=map(int,input().split())\nprint(int(x+y/2))'] | ['Wrong Answer', 'Accepted'] | ['s884185579', 's435353339'] | [2940.0, 2940.0] | [19.0, 17.0] | [41, 46] |
p03219 | u008357982 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['n=int(input())\nt,a=map(int,input().split())\nh=list(map(int,input().split()))\nx=[]\nfor i in range(n):\n x.append(abs(a-(t-h[i]*0.006)))\nprint(x.index(min(x))+1)', 'x,y=map(int,input().split());print(x+y//2)'] | ['Runtime Error', 'Accepted'] | ['s715337252', 's100632093'] | [3060.0, 2940.0] | [17.0, 17.0] | [161, 42] |
p03219 | u009348313 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X, Y = map(int, input())\nprint(X + Y // 2)', 'X, Y = map(int, input().split())\nprint(X + Y // 2)'] | ['Runtime Error', 'Accepted'] | ['s677639592', 's435212425'] | [2940.0, 2940.0] | [17.0, 17.0] | [42, 50] |
p03219 | u010437136 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['n,m = map(int,input().split( ))\nls_a = []\nls_b = [[] for i in range(n)]\nfor i in range(m):\n p,y = map(int,input().split( ))\n ls_a.append([p,y])\n ls_b[p-1].append(y)\nfor i in range(n):\n if len(ls_b[i]) !=0:\n ls_b[i].sort()\nfor i in range(m):\n print(str(ls_a[i][0]).zfill(6) + str(ls_b[ls_a[i][0]-1].index(ls_a[i][1])+1).zfill(6))', 'import io\nimport sys\n\ndef solve(x,y):\n return x+y//2\n\ndef readQuestion():\n\n line1 = sys.stdin.readline().rstrip()\n list1 = line1.split(" ")\n return int(list1[0]),int(list1[1])\n\ndef main():\n n,x = readQuestion()\n answer = solve(n,x)\n print(answer)\n \nif __name__ == \'__main__\':\n main()'] | ['Runtime Error', 'Accepted'] | ['s955640959', 's430601956'] | [3064.0, 3060.0] | [18.0, 17.0] | [350, 310] |
p03219 | u013605408 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X,Y = map(int,input().split())\nprint(X+Y/2)', 'X,Y = map(int,input().split())\nprint(int(X+Y/2))'] | ['Wrong Answer', 'Accepted'] | ['s421140274', 's569141318'] | [2940.0, 2940.0] | [17.0, 17.0] | [43, 48] |
p03219 | u014139588 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y = map(int,input().split())\nprint(x+y/2)', 'x,y = map(int,input().split())\nprint(x+y//2)'] | ['Wrong Answer', 'Accepted'] | ['s961057718', 's540118910'] | [8980.0, 8892.0] | [29.0, 28.0] | [43, 44] |
p03219 | u014887259 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X, Y = map(int, input().split(" "))\nprint(X + (Y / 2))', 'X, Y = map(int, input().split())\nprint(X + Y / 2)', 'X, Y = map(int, input().split())\nprint(X + Y // 2)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s866511862', 's929377952', 's265218571'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [54, 49, 51] |
p03219 | u017063101 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y=map(int,input().split())\nprint(x+y/2)', 'x,y=map(int,input().split())\nprint(int(x+y/2))'] | ['Wrong Answer', 'Accepted'] | ['s960448577', 's037884934'] | [8948.0, 9036.0] | [29.0, 30.0] | [41, 46] |
p03219 | u022550971 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['a,b = map(int, input().rstrip().split())\n\n\nprint(a + b/2)', 'a,b = map(int, input().rstrip().split())\nprint(int(a + b / 2))'] | ['Wrong Answer', 'Accepted'] | ['s868701378', 's437872860'] | [2940.0, 2940.0] | [17.0, 17.0] | [57, 62] |
p03219 | u023229441 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['a,b=map(int,input().split())\nprint(a+b/2)', 'a,b=map(int,input().split())\nprint(a+(b/2))\n', 'a,b=map(int,input().split())\nprint(int(a+b/2))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s595040706', 's748431096', 's769823745'] | [3316.0, 2940.0, 2940.0] | [19.0, 17.0, 17.0] | [41, 44, 47] |
p03219 | u024245528 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X,Y = map(int,input().split())\nx = X + (Y/2)\nprint(x)', 'X,Y = map(int,input().split())\nx = X + int((Y/2))\nprint(x)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s310922038', 's658277272'] | [2940.0, 2940.0] | [17.0, 17.0] | [53, 60] |
p03219 | u027403702 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X,Y = map(int, input().split())\n# N = int(input())\nprint(X + Y / 2)', 'X,Y = map(int, input().split())\n# N = int(input())\nprint(X + Y // 2)'] | ['Wrong Answer', 'Accepted'] | ['s783490412', 's219023838'] | [3064.0, 2940.0] | [17.0, 17.0] | [67, 68] |
p03219 | u028014940 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['\nx,y=map(int,input().split())\n\nprint(x+y/2)', '\nx,y=map(int,input().split())\n\nprint(int(x+y/2))'] | ['Wrong Answer', 'Accepted'] | ['s085895045', 's358035629'] | [2940.0, 2940.0] | [17.0, 17.0] | [43, 48] |
p03219 | u029329478 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X, Y = map(int, input().split())\nprint(X+Y/2)\n', 'X, Y = map(int, input().split())\nprint(int(X+Y/2))\n'] | ['Wrong Answer', 'Accepted'] | ['s055824645', 's344648919'] | [2940.0, 2940.0] | [17.0, 17.0] | [46, 51] |
p03219 | u030726788 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y=map(int,input().split())\nprint((x+y)//2)', 'x, y = map(int, input().split())\nprint(int(x + y/2))'] | ['Wrong Answer', 'Accepted'] | ['s528574223', 's945947408'] | [2940.0, 2940.0] | [17.0, 17.0] | [44, 52] |
p03219 | u033524082 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X = int(input())\nY = int(input())\na = int(X + Y/2)\nprint(a)', 'X,Y = map(int,input().split())\na = int(X + Y/2)\nprint(a)\n'] | ['Runtime Error', 'Accepted'] | ['s202219608', 's460074714'] | [2940.0, 3060.0] | [17.0, 19.0] | [59, 57] |
p03219 | u035356682 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x, y = map(int, input().split())\nprint(x + y / 2)', 'x, y = map(int, input().split())\nprint(int(x + y / 2))'] | ['Wrong Answer', 'Accepted'] | ['s617005854', 's536981384'] | [2940.0, 2940.0] | [17.0, 17.0] | [49, 54] |
p03219 | u037221289 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ["X,Y = map(int,input().split(' '))\nprint(X + Y/2)", "X,Y = map(int,input().split(' '))\nprint(int(X + Y/2))"] | ['Wrong Answer', 'Accepted'] | ['s142028100', 's177703245'] | [2940.0, 2940.0] | [17.0, 18.0] | [48, 53] |
p03219 | u039360403 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y=map(int,input().split())\nprint(x+y/2)\n', 'x,y=map(int,input().split())\nprint(int(x+y/2))\n'] | ['Wrong Answer', 'Accepted'] | ['s753481007', 's577783417'] | [2940.0, 2940.0] | [17.0, 17.0] | [42, 47] |
p03219 | u045408189 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['a,b=map(int,input().split())\nprint(a+(b/2))', 'a,b=map(int,input().split())\nprint(a+(b//2))'] | ['Wrong Answer', 'Accepted'] | ['s025860162', 's264039483'] | [2940.0, 2940.0] | [17.0, 17.0] | [43, 44] |
p03219 | u050698451 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['l = list(map(int, input().split()))\nprint(sum(l)-l[1]/2)', 'l = list(map(int, input().split()))\nprint(int(sum(l)-l[1]/2))\n'] | ['Wrong Answer', 'Accepted'] | ['s123243093', 's139053166'] | [2940.0, 2940.0] | [17.0, 17.0] | [56, 62] |
p03219 | u050708958 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['n = int(input())\nt,a = map(int, input().split())\nh = [int(i) for i in input().split()]\ncandidates = list(map(lambda x: abs(a - t - x * 0.006), h))\nprint(candidates.index(min(candidates)) + 1)\n', 'a,b= map(int, input().split())\nprint(a + int(b/2))'] | ['Runtime Error', 'Accepted'] | ['s747244569', 's534213813'] | [2940.0, 2940.0] | [18.0, 17.0] | [192, 50] |
p03219 | u052347048 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['n=int(input())\nt,a=map(int,input().split())\nlis=list(map(int,input().split()))\nli=abs((t-lis[0]*0.006)-a)\nl=0\nfor i in range(1,n):\n if abs((t-lis[i]*0.006)-a) < li:\n li=abs((t-lis[i]*0.006)-a)\n l=i\nprint(l+1)', 'n=int(input())\nt,a=map(int,input().split())\nlis=list(map(int,input().split()))\nli=abs((t-lis[0]*0.006)-a)\nl=0\nfor i in range(1,n):\n if abs((t-lis[i]*0.006)-a) < li:\n li=abs((t-lis[i]*0.006)-a)\n l=i\nprint(l+1)', 'n=int(input());t,a=map(int,input().split())\nlis=list(map(int,input().split()));li,l=abs((t-lis[0]*0.006)-a),0\nfor i in range(1,n):if abs((t-lis[i]*0.006)-a) < li:li,l=abs((t-lis[i]*0.006)-a),i\nprint(l+1)', 'n=int(input());t,a=map(int,input().split())\nlis=list(map(int,input().split()))\nli,l=abs((t-lis[0]*0.006)-a),0\nfor i in range(1,n):\n b = abs((t-lis[i]*0.006)-a)\n if b < li:\n li=b\n l=i\nprint(l+1)', 'n=int(input())\nt,a=map(int,input().split())\nlis=list(map(int,input().split()))\nli=abs((t-lis[0]*0.006)-a)\nl=0\nfor i in range(1,n):\n if abs((t-lis[i]*0.006)-a) < li:\n li=abs((t-lis[i]*0.006)-a)\n l=i\nprint(l+1)', 'n = int(input())\nt,a = map(int,input().split())\nlis = list(map(int,input().split()))\n \nli = abs((t-lis[0]*0.006)-a)\nl = 0\nfor i in range(1,n):\n if abs((t-lis[i]*0.006)-a) < li:\n li=abs((t-lis[i]*0.006)-a)\n l=i\nprint(l+1)', 'n=int(input())\nt,a=map(int,input().split())\nlis=list(map(int,input().split()))\nli,l=abs((t-lis[0]*0.006)-a),0\nfor i in range(1,n):\n b = abs((t-lis[i]*0.006)-a)\n if b < li:\n li=b\n l=i\nprint(l+1)', 'a,b=map(int,input().split());print(a+b//2)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s041681908', 's109736706', 's328542275', 's398950920', 's528386986', 's753654426', 's919022241', 's259364645'] | [3188.0, 3064.0, 2940.0, 3060.0, 3064.0, 3064.0, 3060.0, 2940.0] | [19.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [225, 225, 203, 213, 225, 237, 213, 42] |
p03219 | u054931633 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y=map(int,input().split())\nprintint((x+y/2))', 'x,y=map(int,input().split())\nprint(int(x+y/2))'] | ['Runtime Error', 'Accepted'] | ['s508005672', 's162626596'] | [9148.0, 9012.0] | [27.0, 28.0] | [46, 46] |
p03219 | u058592821 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['a, b = (int(i) for i in input().split())\nprint(a+b/2)', 'a, b = (int(i) for i in input().split())\nprint(b//2+a)'] | ['Wrong Answer', 'Accepted'] | ['s302723436', 's678553569'] | [2940.0, 2940.0] | [17.0, 17.0] | [53, 54] |
p03219 | u060793972 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['a,b=map(int.input().split())\nprint(a + b//2)', 'a,b=map(int,input().split())\nprint(a + b//2)\n'] | ['Runtime Error', 'Accepted'] | ['s098471766', 's284651135'] | [2940.0, 2940.0] | [17.0, 17.0] | [44, 45] |
p03219 | u062604519 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y = map(int,input().split())\nprint(x+y/2)', 'x,y = map(int,input().split())\nprint(int(x+y/2))'] | ['Wrong Answer', 'Accepted'] | ['s036320640', 's705383815'] | [3316.0, 2940.0] | [21.0, 18.0] | [43, 48] |
p03219 | u063346608 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X,Y = map(int,input().split())\n\nanswer = int(X + Y / 2)', 'X,Y = map(int,input().split())\n \nanswer = int(X + Y / 2)\n\nprint(answer)'] | ['Wrong Answer', 'Accepted'] | ['s440852066', 's566564328'] | [2940.0, 2940.0] | [17.0, 17.0] | [55, 71] |
p03219 | u064246852 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['print(int(input()) + int(input())//2)', 'print(int(input())+int(input())//2)', 'x,y = map(int,input().split())\nprint(x+y//2)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s566962266', 's772805355', 's570481629'] | [3064.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [37, 35, 44] |
p03219 | u064563749 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X,Y=map(int,input().split())\ncost=X+Y/2\nprint(cost)', 'X,Y=map(int,input().split())\ncost=X+Y/2\nprint(int(cost))\n'] | ['Wrong Answer', 'Accepted'] | ['s835600467', 's082693372'] | [2940.0, 2940.0] | [17.0, 19.0] | [51, 57] |
p03219 | u065446124 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['a,b= map(int, input().split())\nprint(a+b/2)', 'a,b= map(int, input().split())\nc=a+b/2\nprint(c)', 'a,b= map(int, input().split())\nprint(int(a+b/2))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s536249881', 's943359581', 's287104591'] | [2940.0, 3060.0, 2940.0] | [17.0, 57.0, 17.0] | [43, 47, 48] |
p03219 | u066692421 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['fee = list(map(int, input().split()))\nprint(fee[0] + fee[1] / 2)', 'fee = list(map(int, input().split()))\nprint(fee[0] + int(fee[1] / 2))'] | ['Wrong Answer', 'Accepted'] | ['s869046075', 's209389747'] | [2940.0, 2940.0] | [17.0, 17.0] | [64, 69] |
p03219 | u070561949 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['#import time as time\n\n#s = time.time()\n\nn,m = map(int,input().split())\npy = []\nod = [[]*1 for i in range(n)]\n\n\n\n#s = time.time()\nfor i in range(0,m):\n p,y = map(int,input().split())\n py.append([p,y])\n \n odlen = len(od[p-1])\n if odlen >= 1 :\n\n low = 0\n high = odlen - 1\n mid = odlen//2\n\n while low <= high:\n mid = (low + high) >> 1\n guess = od[p-1][mid]\n if guess == y:\n break\n if guess > y :\n high = mid - 1\n else:\n low = mid + 1\n\n od[p-1].insert(low,y)\n\n else:\n od[p-1].append(y)\n\n#print ("sort: " + str(time.time() - s) )\n\n#s = time.time()\nfor i in range(0,m):\n r = od[py[i][0]-1].index(py[i][1])\n\n tmp = py[i][0]\n digit = 0\n while tmp > 0 : \n digit += 1\n tmp = tmp // 10\n \n for j in range(6-digit):\n print(\'0\',end="")\n print(py[i][0],end="")\n\n tmp = r + 1\n digit = 0\n while tmp > 0 : \n digit += 1\n tmp = r // 10\n\n for j in range(6-digit):\n print(\'0\',end="")\n print(r+1)\n\n#print ("index: " + str(time.time() - s) )', 'x,y = map(int,input().split())\nprint(str(x+(y>>1)))'] | ['Runtime Error', 'Accepted'] | ['s781878228', 's327573967'] | [3064.0, 2940.0] | [17.0, 17.0] | [1220, 51] |
p03219 | u071061942 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['l= input().split\nX = int(l[0])\nY = int(l[1])\nx = X + Y/2\nprint(x)', 'l = input().split()\nX = int(l[0])\nY = int(l[1])\nx = int(X + Y/2)\nprint(x)'] | ['Runtime Error', 'Accepted'] | ['s256929131', 's467775621'] | [2940.0, 2940.0] | [17.0, 18.0] | [65, 73] |
p03219 | u072717685 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X, Y = map(int, input().split())\nprint(X + Y/2)', 'X, Y = map(int, input().split())\nprint(int(X + Y/2))'] | ['Wrong Answer', 'Accepted'] | ['s212367327', 's483112797'] | [2940.0, 2940.0] | [18.0, 17.0] | [47, 52] |
p03219 | u076996519 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y = map(int, input().split())\nprint(int(x+y/2)', 'x,y = map(int, input().split())\nprint(x+y/2)', 'n = int(input())\nt,a = map(int, input().split())\nh = list(map(int, input().split()))\n\nfor i in range(n):\n\th[i] = abs(a-(t - h[i]*0.006))\n\nprint(h.index(min(h))+1)', 'x,y = map(int, input().split())\nprint(int(x+y/2))'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s389463416', 's588381957', 's672459538', 's214359483'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [48, 44, 162, 49] |
p03219 | u078276601 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x, y = map(int, input().split())\n\nprint(x + y/2)', 'x, y = map(int, input().split())\n\nprint(x + y//2)'] | ['Wrong Answer', 'Accepted'] | ['s431305854', 's048834589'] | [9104.0, 9156.0] | [24.0, 25.0] | [48, 49] |
p03219 | u079543046 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x, y = map(int, input().split())\nprint(x+y/2)\n ', 'x, y = map(int, input().split())\nprint(int(x+y/2))'] | ['Wrong Answer', 'Accepted'] | ['s301098683', 's027828723'] | [2940.0, 2940.0] | [17.0, 17.0] | [48, 50] |
p03219 | u079644963 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x, y = map(int, input().split())\nprint(x + y / 2)', 'x, y = map(int, input().split())\nr = x + y / 2\nprint(r)', 'x, y = map(int, input().split())\nprint(int(x + y / 2))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s508350165', 's995131952', 's683950651'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0] | [49, 55, 54] |
p03219 | u081472919 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y = map(int,input().split())\nsum = x + y/2\nprint(sum)', 'x,y = map(int,input().split())\nprint(x + y/2)', 'x,y = map(int,input().split())\nsum = x + y//2\nprint(sum)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s315551044', 's561647816', 's241335190'] | [9088.0, 9040.0, 9052.0] | [30.0, 26.0, 30.0] | [55, 45, 56] |
p03219 | u088020258 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X,Y=map(int,input().split())\nprint(X+Y/2)', 'X,Y=map(int,input().split())\nprint(X+Y//2)'] | ['Wrong Answer', 'Accepted'] | ['s732536745', 's715686366'] | [2940.0, 2940.0] | [17.0, 17.0] | [41, 42] |
p03219 | u089376182 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x, y = map(int, input().split())\nprint(x+y/2)', 'x, y = map(int, input().split())\nprint(x+y//2)'] | ['Wrong Answer', 'Accepted'] | ['s161772377', 's861349847'] | [2940.0, 2940.0] | [17.0, 17.0] | [45, 46] |
p03219 | u093033848 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['N = int(input())\nT, A = map(int, input().split())\ndiff =50000000\nnum = 0\nfor i in range(N):\n H = int(input())\n if abs(T - H*0.006) < diff:\n num = i + 1', 'n = int(input())\nt, a = map(int, input().split())\ne = [int(i) for i in input().split()]\n\ntemp = []\nfor i in e:\n temp.append(abs(t - i * 0.006 - a))\n \nprint(e)\nprint(temp)\nprint(temp.index(min(temp)) + 1)\n\n\n', 'X, Y = map(int, input().split())\nprint(X + Y // 2)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s088048882', 's342363424', 's349996440'] | [2940.0, 3060.0, 2940.0] | [19.0, 17.0, 18.0] | [164, 212, 50] |
p03219 | u094102716 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['a,b = map(int(input().split()))\nprint(a+b//2)\n', 'a,b = map(int,input().split())\nprint(a+b//2)\n'] | ['Runtime Error', 'Accepted'] | ['s014425538', 's940906675'] | [9008.0, 9144.0] | [29.0, 23.0] | [46, 45] |
p03219 | u095756391 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['X, Y = map(int, input().split())\n\nans = X + (Y / 2)\n\nprint(ans)', 'X, Y = map(int, input().split())\n \nans = X + (Y / 2)\n \nprint(int(ans))'] | ['Wrong Answer', 'Accepted'] | ['s900173600', 's704396325'] | [2940.0, 2940.0] | [18.0, 18.0] | [63, 70] |
p03219 | u099566485 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x=int(input())\ny=int(input())\nprint(x+y//2)', 'x,y=map(int,input().split())\nprint(x+y//2)'] | ['Runtime Error', 'Accepted'] | ['s209014314', 's483019917'] | [2940.0, 2940.0] | [17.0, 17.0] | [43, 42] |
p03219 | u102960641 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y = map(int,input().split())\nprint(x+y/2)', 'x,y = map(int,input().split())\nprint(x+y//2)\n'] | ['Wrong Answer', 'Accepted'] | ['s552079500', 's546865328'] | [2940.0, 2940.0] | [17.0, 17.0] | [43, 45] |
p03219 | u104003430 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x, y = map(int, input().split())\nprint(x+y/2)', 'x, y = map(int, input().split())\nprint(x+y/2)', 'x, y = map(int, input().split())\nprint(int(x+y/2))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s259772409', 's421676975', 's364457498'] | [2940.0, 2940.0, 3064.0] | [18.0, 17.0, 18.0] | [45, 45, 50] |
p03219 | u111365959 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ["a,b = input().split(' ')\na = int(a)\nb = int(b)\nb /= 2\nprint(a+b)", "a,b = input().split(' ')\na = int(a)\nb = int(b)\nb *= 2\nprint (a+b)", "a,b = input().split(' ')\na = int(a)\nb = int(b) / 2\nprint(a + b)", "a,b = input().split(' ')\na = int(a)\nb = int(b)\nb /= 2\nprint(a+b)\n", "a,b = input().split(' ')\na = int(a)\nb = int(b)\nb /= 2\nprint(int(a+b))\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s018519622', 's103022622', 's301013420', 's859531974', 's092642814'] | [2940.0, 2940.0, 3060.0, 2940.0, 2940.0] | [17.0, 18.0, 19.0, 18.0, 18.0] | [64, 65, 63, 65, 70] |
p03219 | u112567325 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['A,B = list(map(int,input().split()))\nprint(A+B/2)', 'A,B = list(map(int,input().split()))\nprint(A+int(B/2))'] | ['Wrong Answer', 'Accepted'] | ['s706338340', 's966908579'] | [2940.0, 2940.0] | [17.0, 17.0] | [49, 54] |
p03219 | u114648678 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['81 58', 'a,b=map(int,input().split())\nprint(int(a+b/2))'] | ['Runtime Error', 'Accepted'] | ['s319218700', 's431789488'] | [2940.0, 2940.0] | [17.0, 18.0] | [5, 46] |
p03219 | u116233709 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y=map(int,input().split())\nprint(x+(y/2))', 'x,y=map(int,input().split())\nprint(int(x+(y/2)))\n'] | ['Wrong Answer', 'Accepted'] | ['s180900475', 's871464816'] | [2940.0, 2940.0] | [17.0, 17.0] | [43, 49] |
p03219 | u117193815 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['a,b = map(int, input().split())\ni=b/2+a\nprint(i)', 'a,b = map(int, input().split())\nprint((b/2)+a)\n', 'import math\na,b = map(int, input().split())\nprint(math.ceil(((b/2)+a)))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s427102930', 's906209431', 's670497775'] | [2940.0, 2940.0, 2940.0] | [20.0, 17.0, 18.0] | [48, 47, 71] |
p03219 | u118019047 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y = list(map(int,input().split()))\nprint(x + (y/2))', 'x,y = list(map(int,input().split()))\nprint(x + int(y/2))'] | ['Wrong Answer', 'Accepted'] | ['s993527755', 's203782146'] | [2940.0, 2940.0] | [17.0, 17.0] | [53, 56] |
p03219 | u124070765 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x,y=map(int,input().split())\nprint(x+y/2)', 'x,y=map(int,input().split())\nprint(x+y//2)'] | ['Wrong Answer', 'Accepted'] | ['s286607229', 's475460948'] | [2940.0, 2940.0] | [18.0, 18.0] | [41, 42] |
p03219 | u127856129 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['a,b=map(int,input().split())\nprint(a+b/2)', 'a,b=map(int,input().split())\nprint(a+b//2)\n'] | ['Wrong Answer', 'Accepted'] | ['s438768217', 's167783860'] | [2940.0, 2940.0] | [17.0, 18.0] | [41, 43] |
p03219 | u128740947 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['x = int(input())\ny = int(input())\nprint(y/2+x)\n\n', 'x,y= map(int,input().split())\n\nprint(y/2+x)', 'x,y= map(int,input().split())\n\nprint(int(y/2+x))'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s127439298', 's790521883', 's548811970'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0] | [48, 43, 48] |
p03219 | u129492036 | 2,000 | 1,048,576 | There is a train going from Station A to Station B that costs X yen (the currency of Japan). Also, there is a bus going from Station B to Station C that costs Y yen. Joisino got a special ticket. With this ticket, she can take the bus for half the fare if she travels from Station A to Station B by train and then travels from Station B to Station C by bus. How much does it cost to travel from Station A to Station C if she uses this ticket? | ['import math\n', 'import math\nprint(math.log(10))', 'x, y = map(int, input().split())\nprint(int(x+y/2))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s091654382', 's321498159', 's254074821'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [12, 31, 50] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.