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
p02721
u711539583
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
["n, k, c = map(int, input().split())\ns = input()\n\ncnt = 0\nd = c + 1 \nno = 0 \nf = 0\nans = []\ncand = []\n\n\n\n\n\nfor i in range(n):\n if d > c:\n if no == 0 and cand: \n ans.extend(cand)\n cand = []\n if s[i] == 'o':\n cnt += 1\n d = 0\n n...
['Wrong Answer', 'Accepted']
['s825830806', 's707297498']
[12772.0, 22204.0]
[287.0, 297.0]
[818, 347]
p02721
u726285999
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
["N, K, C = map(int, input().split())\nS = input()\n\nwork_date = []\ncount = 0\n\n\npw = 0\n\nfor d in range(K):\n\n w = S[pw:].index('o') + pw\n work_date.append(w)\n\n \n pw = w + C + 1\n \n\nwork_date_l = []\n\nSr = list(reversed(S))\npw = 0\n\nfor d in range(K):\n\n w = Sr[pw:].index('o') + pw\n ...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s020292852', 's091769368', 's454294122', 's732656859', 's888666474', 's008797705']
[14324.0, 22548.0, 21196.0, 15048.0, 13724.0, 22548.0]
[2104.0, 323.0, 149.0, 2104.0, 2104.0, 342.0]
[663, 519, 537, 663, 658, 527]
p02721
u824237520
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
["n, k, c = map(int, input().split())\ns = list(input())\n\nR = []\np = 0\nfor _ in range(k):\n R.append(p)\n p += c\n while s[p] == 'x':\n p += 1\n\nL = []\np = n - 1\nfor _ in range(k):\n L.append(p)\n p -= c\n while s[p] == 'x':\n p -= 1\n\nL = list(reversed(L))\n\nfor i in range(k):\...
['Runtime Error', 'Accepted']
['s414207789', 's658642726']
[15908.0, 22308.0]
[159.0, 324.0]
[337, 350]
p02721
u834983620
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
['a,b,c = map(int,(input().split()))\nmb = input()\n\nrl = list()\nll = list()\n\nfor i in range(a):\n if mb[i] == "x":continue\n if len(rl) == 0:\n rl.append(i + 1)\n else:\n if rl[-1] + c + 1 <= i + 1:\n rl.append(i + 1)\n #if len(rl) <= b:break\n\nfor i in range(a-1,-1,-1...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s053245114', 's457222197', 's696626385', 's999913896', 's950207484']
[25216.0, 11432.0, 11432.0, 26884.0, 23696.0]
[285.0, 145.0, 141.0, 308.0, 446.0]
[637, 654, 654, 650, 678]
p02721
u837673618
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
['def solve():\n N, K, C = map(int, input().split())\n workable = [i for i, s in enumerate(input()) if s=="o"]\n if len(workable) == K:\n return workable\n \n latest = set()\n prev = workable[-1]+C+1\n for x in reversed(workable):\n if prev - x > C:\n latest.add(x)\n prev = x\n if len(late...
['Wrong Answer', 'Accepted']
['s649497011', 's508280571']
[23972.0, 23968.0]
[72.0, 89.0]
[511, 617]
p02721
u852790844
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
["import itertools\nn, k, c = map(int, input().split())\ns = input()\na = [i for i in range(n)]\nb = list(itertools.combinations(a,k))\nfor i in b:\n for j in range(k):\n if s[i[j]] == 'x':\n break\n if j != 0:\n if i[j] - i[j-1] <= c:\n break\n a = set(a) & ...
['Wrong Answer', 'Accepted']
['s278994580', 's090306087']
[1765108.0, 20620.0]
[2214.0, 397.0]
[340, 444]
p02721
u873927631
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
['#!/usr/bin/env python3\nimport sys\n\n\ndef solve(N: int, K: int, C: int, S: str):\n \n work = 0\n rest = 0\n startWork = -1\n girigiriIndices = []\n for i in range(N):\n \n # print(f"i=15{rest}")\n if S[i] == "o" and rest <= 0:\n rest = C\n work += 1\n...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s704420730', 's727536845', 's757009035']
[3516.0, 2940.0, 47400.0]
[45.0, 17.0, 251.0]
[1370, 1346, 1725]
p02721
u875541136
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
["N, K, C = map(int, input().split())\nS = input()\n\nL = []\nR = []\nholiday = 0\n\nfor i in range(N):\n if holiday:\n holiday -= 1\n elif S[i] == 'o':\n L.append(i)\n holiday = C\nholiday = 0\nfor i in range(N-1, -1, -1):\n if holiday:\n holiday -= 1\n elif S[i] == 'o':\n R.append(i)\n holiday =...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s736627891', 's860225790', 's742117839']
[35384.0, 35384.0, 35360.0]
[266.0, 269.0, 296.0]
[388, 388, 404]
p02721
u876295560
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
["nkc=input().split()\nK=int(nkc[1])\nC=int(nkc[2])\ns=input()\nworkday_list=[]\nfor i,youso in enumerate(s) :\n if youso=='o' :\n workday_list.append(i+1)\n \n\ns=1\n\ncurrent_num=0\ncurrent_num1=1\nlist1=[]\nlist1.append(workday_list[0])\nwhile(s<K) :\n \n if current_num1>=len(workday_list):\n break\n el...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s441229699', 's557133743', 's152842434']
[21304.0, 80108.0, 15648.0]
[482.0, 2108.0, 576.0]
[950, 511, 970]
p02721
u894521144
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
["\n\nN, K, C = list(map(int, input().split()))\nS = list(input())\n\nF = []\nL = []\n\n# t1 = time.time()\n\n# if S[i] == 'o':\n# if len(F) == 0:\n# F.append(i)\n# elif F[-1] + C < i:\n# F.append(i)\n# if len(F) >= K:\n# break\n# print(F)\n# t2 = time.time()\ni =...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s254057445', 's570092228', 's748092450']
[3064.0, 51788.0, 51792.0]
[17.0, 399.0, 403.0]
[790, 752, 872]
p02721
u919730120
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
["def main():\n n,k,c=map(int,input().split())\n s=list(input())\n l=[0]*(k+1)\n r=[0]*(k+1)\n x=0\n i=0\n while i<=n-1:\n if s[i]=='o':\n x+=1\n l[x]=i+1\n i+=k+1\n if x==k:\n break\n else:\n i+=1\n print(l)\n ...
['Runtime Error', 'Accepted']
['s073534137', 's988859484']
[10632.0, 21908.0]
[172.0, 285.0]
[603, 575]
p02721
u933929042
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
["common = []\n\ndef bool_work(s, n, k, c):\n i = 0\n while s[i] == 'o':\n if i+c+1 < n:\n j = 1\n if s[j] == 'x':\n while s[j] == 'x':\n j += 1\n wo_i = bool_work(s[j:], n - j, k, c)\n if j < i+c+1:\n j = i+c+1\n ...
['Runtime Error', 'Accepted']
['s651886210', 's348128435']
[198656.0, 20548.0]
[189.0, 389.0]
[1074, 562]
p02721
u969639186
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
['import copy\n \nn,k,c = map(int,input().split())\ns = list(input())\n \nfront = []\nback = []\n \n\nj = copy.copy(k)\ni = 0\nwhile j > 0:\n if s[i] == "o":\n front.append(i)\n i += c+1\n j -= 1\n else:\n i += 1\n \n\n \nj = copy.copy(k)\ni = n-1\nwhile j > 0:\n if s[i] == "o":\n back.append(i)\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s285191362', 's820420059', 's242367900']
[22560.0, 11380.0, 22564.0]
[339.0, 341.0, 336.0]
[440, 462, 447]
p02721
u980205854
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
["\nN,K,C = map(int,input().split())\nS = input()\nL = [0]*K\nR = [0]*K\n\ni = 0\nfor j in range(K):\n while S[i]!='o':\n i += 1\n L[j] = i\n i += C+1\n\ni = K-1\nfor j in range(K-1,-1,-1):\n while S[i]!='o':\n i -= 1\n R[j] = i\n i -= C+1\n \nfor j in range(K):\n if L[j]==R[j]:\n ...
['Wrong Answer', 'Accepted']
['s523149817', 's280275644']
[25088.0, 25024.0]
[194.0, 202.0]
[326, 328]
p02721
u989345508
2,000
1,048,576
Takahashi has decided to work on K days of his choice from the N days starting with tomorrow. You are given an integer C and a string S. Takahashi will choose his workdays as follows: * After working for a day, he will refrain from working on the subsequent C days. * If the i-th character of S is `x`, he will not...
['n,k,c=map(int,input().split())\ns=input()\n\n\n\n\n\n\nl=[-1]*k\nr=[-1]*k\nnowl=0\nindl=0\nwhile nowl<n and indl<k:\n for i in range(nowl,n):\n if s[i]=="o":\n l[indl]=i\n nowl=i+c+1\n indl+=1\n break\nnowr=n-1\nindr=k-1\nwhile nowr>=0 and indr>=0:\n for i in r...
['Runtime Error', 'Accepted']
['s917458575', 's285882736']
[19164.0, 20608.0]
[364.0, 523.0]
[879, 889]
p02722
u006883624
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['\ndef judge(n, k):\n m = n % k\n while m == 0:\n n //= k\n m = n % k\n return m\n\n\ndef calc(n):\n cnt = 3\n for k in range(2, n // 2):\n if judge(n, k) == 1:\n cnt += 1\n return cnt\n\n\ndef cal(n):\n cnt = 3\n for d in range(3, 10):\n if n % d <= 1:\n ...
['Wrong Answer', 'Accepted']
['s025724446', 's995846328']
[3064.0, 3828.0]
[2104.0, 210.0]
[559, 481]
p02722
u008079810
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['\n\nN=int(input())\ncand=[]\n\ndef check(N0,K0):\n if N0%K0==0:\n return check(int(N0/K0),K0)\n elif N0%K0==1:\n return 1\n else:\n return 0\n\ndef check0(N0,K0):\n while N0%K0==0:\n N0=int(N0/K0)\n if N0%K0==1:\n return 1\n else:\n return 0\n\n\nfor i in ra...
['Wrong Answer', 'Accepted']
['s595278750', 's152359831']
[3316.0, 3188.0]
[297.0, 308.0]
[777, 778]
p02722
u021916304
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
["n = int(input())\nif n == 2:\n print(1)\n exit()\nans = []\ndivisors = []\nfor i in range(2,int(n**0.5)+1):\n \n if (n-1) % i == 0:\n ans.append(i)\n if i != (n-1) // i:\n ans.append((n-1)//i)\n \n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n ...
['Wrong Answer', 'Accepted']
['s762095073', 's983532918']
[3316.0, 3188.0]
[288.0, 288.0]
[1087, 1089]
p02722
u075595666
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['def 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 if arr==[...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s303399585', 's445659065', 's500010098', 's968380440', 's369410566']
[3064.0, 3188.0, 3064.0, 3064.0, 3316.0]
[195.0, 196.0, 196.0, 195.0, 196.0]
[787, 810, 701, 676, 948]
p02722
u078932560
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['import numpy as np\n \nN = int(input())\n \n \ndef divisor(N):\n x = np.arange(1, int(N**(1/2)), dtype=np.int64)\n div = set(x[N % x == 0])\n return div | set(N // x for x in div)\n \n \ncand = divisor(N) | divisor(N - 1)\n \n \ndef test(N, K):\n if K == 1:\n return False\n while N % K == 0:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s176605973', 's718464687', 's439672872']
[28796.0, 30360.0, 28896.0]
[239.0, 240.0, 238.0]
[392, 507, 394]
p02722
u091051505
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['import math\nimport copy\ndef prime_factorize(n):\n a = [n]\n for i in range(2, math.floor(n ** 0.5) + 1):\n if n % i == 0:\n a.append(i)\n if n // i != i:\n a.append(n // i)\n return a\n\nN = int(input())\nprime_n = prime_factorize(N)\nprime_n_1 = prime_factorize(...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s048232456', 's522566448', 's674926318', 's336973382']
[9504.0, 9208.0, 9552.0, 9608.0]
[198.0, 26.0, 196.0, 198.0]
[514, 457, 469, 514]
p02722
u095021077
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['\ndef f(x):\n out=set() \n for i in range(1, int(pow(x, 1/2))):\n \n if x%i==0:\n \n out.add(i)\n out.add(x//i)\n \n \n if x%(x**(1/2))==0:\n out.add(x**(1/2))\n \n \n out=list(out)\n out.sort()\n \n \n return out[1:]\n\n\nN=int(input())\nans=0 \n\nfor K in f(N): \n x=N \n...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s185643112', 's846132749', 's648588067']
[3828.0, 2940.0, 3828.0]
[209.0, 17.0, 210.0]
[1402, 1398, 1409]
p02722
u106181248
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n = int(input())\n\ndef make_divisors(n): \n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n divisors.sort()\n divisors.remove(1)\n return divisors\n\nans = make_divisors(n-...
['Wrong Answer', 'Accepted']
['s498496833', 's707612310']
[3188.0, 3188.0]
[209.0, 210.0]
[710, 711]
p02722
u110615365
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['def divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n%i == 0:\n divisors.append(i)\n if i != n//i:\n divisors.append(n//i)\n return sorted(divisors) \nn = int(input())\nans = len(divisors(n-1))-1;\nfor k in divisors(N)[1:]:\n boz = n\n w...
['Runtime Error', 'Accepted']
['s001678370', 's836614691']
[3064.0, 3316.0]
[114.0, 210.0]
[399, 400]
p02722
u116233709
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n=int(input())\ndef prime_factorize(n):\n a=[]\n while n%2==0:\n a.append(2)\n n//=2\n f=3\n while f**2<=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\nimport collections\nA=collections....
['Wrong Answer', 'Time Limit Exceeded', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s017639312', 's356355525', 's614089683', 's683950343', 's900978233']
[3316.0, 3316.0, 3444.0, 3436.0, 3564.0]
[346.0, 2106.0, 382.0, 218.0, 321.0]
[730, 606, 612, 740, 662]
p02722
u163320134
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['def divisors(n):\n ret=[]\n for i in range(2,int(n**0.5)+1):\n if n%i==0:\n ret.append(i)\n if n//i!=i:\n ret.append(n//i)\n return ret\n\nn=int(input())\ndivs1=divisors(n)\ndivs2=divisors(n-1)\ncnt=len(divs2)-1\nfor val in divs1:\n if val==1:\n continue\n tmp=n\n while tmp%val==0:\n t...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s037264332', 's134499193', 's476649211', 's589177131']
[3188.0, 3188.0, 3444.0, 3188.0]
[213.0, 209.0, 214.0, 209.0]
[350, 348, 491, 350]
p02722
u169350228
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n = int(input())\n\ndef yakusu(x):\n xx = 2\n y = []\n while xx*2 <= x:\n if x%xx == 0:\n y.append(xx)\n xx += 1\n return y\n\nans = len(yakusu(n-1))\n\nkk = yakusu(n)\nfor i in kk:\n nn = n\n while True:\n if nn%i == 0:\n nn = nn//i\n else:\n ...
['Wrong Answer', 'Accepted']
['s669592150', 's371391584']
[2940.0, 3188.0]
[2107.0, 758.0]
[356, 469]
p02722
u190616335
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['#!/usr/bin/python3\n# -*- coding: utf-8 -*-\ndef make_divisors(n):\n divisors = []\n for i in range(2, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\nn = int(input())\nif n == 2:\n print...
['Wrong Answer', 'Accepted']
['s649151497', 's326260699']
[3188.0, 3188.0]
[114.0, 210.0]
[950, 775]
p02722
u192042624
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['import math\n\n\nN = int(input())\n\nnn = int(math.sqrt(N))\n\nans = 0\nfor x in range(2,nn+1):\n\n if N % x > 1:\n continue\n\n if N % x == 1:\n ans += 1\n continue\n \n tmp = N\n while True:\n tmp = tmp / x\n if tmp % x == 1:\n ans += 1\n brea...
['Wrong Answer', 'Accepted']
['s086127594', 's516180711']
[3060.0, 3064.0]
[144.0, 623.0]
[424, 527]
p02722
u228223940
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n = int(input())\nn = n-1\nans = 0\n\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\n\nli = make_divisors(n)\n\nfor i in range(2,...
['Runtime Error', 'Accepted']
['s768074697', 's204987086']
[3188.0, 3064.0]
[686.0, 671.0]
[855, 864]
p02722
u231189826
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['import math\nN = int(input())\nans = [N-1,N]\n\n#N-1\nfor i in range(2,int(math.sqrt(N-1)+1)):\n if (N-1) % i == 0:\n ans.append(i)\n if i != (N-1)//i:\n ans.append((N-1)//i)\n\n#N\nfor j in range(2,int(math.sqrt(N))+1):\n if N % j == 0:\n n1 = N\n n2 = N\n while n1...
['Wrong Answer', 'Accepted']
['s001815778', 's198073544']
[3064.0, 3188.0]
[297.0, 306.0]
[538, 589]
p02722
u243714267
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n = int(input())\nif n == 2:\n print(1)\nelif n == 3:\n print(2)\nelse:\n \n print(len(make_divisors(n-1))+1)', 'def make_divisors(n):\n lower_divisors , upper_divisors = [], []\n i = 1\n while i*i <= n:\n if n % i == 0:\n lower_divisors.append(i)\n if i != n // i:\n ...
['Runtime Error', 'Accepted']
['s937217584', 's716471192']
[9056.0, 9152.0]
[24.0, 293.0]
[140, 558]
p02722
u266014018
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['import collections\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\n\nN = int(input())\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s010891939', 's068020926', 's185270040']
[3316.0, 3316.0, 3316.0]
[368.0, 247.0, 245.0]
[601, 659, 633]
p02722
u268792407
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n=int(input())\nN=[n]\nimport collections\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0 and i!=1:\n divisors.append(i)\n if i != n // i and n//i!=1:\n divisors.append(n//i)\n return divisors+[n]\nt=make_divisors(n)+make_divisor(n-1)\nans=0\nfor k in ...
['Runtime Error', 'Accepted']
['s467748049', 's497307948']
[3572.0, 3700.0]
[116.0, 194.0]
[411, 734]
p02722
u278057806
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['from sys import stdin\nfrom math import sqrt\ninput = stdin.readline\n\nN = int(input())\ncnt = 2\n\nfor i in range(2, int(sqrt(N)) + 1):\n if (N - 1) % i == 0:\n cnt += 1\n\nfor i in range(2, int(sqrt(N)) + 1):\n tmp = N // i\n if (tmp - 1) % i == 0:\n cnt += 1\n\n\nfor i in range(2, int(sqrt(...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s065459880', 's776425719', 's824398741']
[3064.0, 3324.0, 3064.0]
[2104.0, 308.0, 326.0]
[412, 542, 553]
p02722
u281610856
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
["def make_divisors(n):\n divisors = []\n for i in range(1, int(n ** 0.5) + 1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n // i)\n return divisors\n\n\ndef main():\n n = int(input())\n \n ans = len(make_divisors(n-1))\n \n...
['Wrong Answer', 'Accepted']
['s653896550', 's092493119']
[3188.0, 3316.0]
[207.0, 209.0]
[639, 616]
p02722
u347600233
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['def calc_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n divisors.sort()\n return divisors\n\ndef div_or_sub(n, k):\n while k <= n:\n if n % k == 0:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s105068873', 's892589899', 's118373550']
[3188.0, 3188.0, 3188.0]
[210.0, 210.0, 209.0]
[546, 546, 546]
p02722
u363074342
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['N = int(input())\n\ndivisor = [N]\nans = 0\n\n\nfor i in range(2,N+1,1):\n if i*i <= N:\n if N % i == 0:\n divisor.append(i)\n divisor.append(N//i)\n\n\nyakusuuu = [N-1]\nfor i in range(2,N,1):\n if i*i <= N:\n if N % i == 1:\n yakusuuu.append(i)\n yakus...
['Wrong Answer', 'Accepted']
['s651941240', 's349773305']
[3188.0, 3188.0]
[2104.0, 520.0]
[759, 838]
p02722
u365364616
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['from collections import defaultdict\n\ndef prime_factrize(n):\n b = defaultdict(int)\n while n % 2 == 0:\n b[2] += 1\n n //= 2\n f = 3\n while f * f <= n:\n if n % f == 0:\n b[f] += 1\n n //= f\n else:\n f += 2\n if n != 1:\n b[n] += 1...
['Wrong Answer', 'Accepted']
['s899254814', 's517895299']
[3316.0, 3828.0]
[373.0, 349.0]
[554, 377]
p02722
u371132735
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['def is_prime(n):\n if n == 2 or n%2 == 0:\n return False\n for i in range(2,int(n**0.5)):\n if n%i == 0:\n return False\n return True\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s662603525', 's974479381', 's658448899']
[3316.0, 3316.0, 3316.0]
[114.0, 114.0, 210.0]
[535, 518, 477]
p02722
u392319141
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['from math import gcd\n\nprint(gcd(120, 24))', 'from fractions import gcd\n\nprint(gcd(120, 24))\n', 'N = int(input())\n\ndef isOk(k):\n n = N\n while n % k == 0:\n n //= k\n return n % k == 1\n\n\ndef divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s704019170', 's895996755', 's907490304']
[2940.0, 5304.0, 3188.0]
[17.0, 40.0, 211.0]
[41, 47, 536]
p02722
u413165887
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['num = int(input())\nnum -= 1\nresult = 1\nfor i in range(2, int(pow(num, 0.5))+1):\n c = 0\n while num%i==0:\n num //= i\n c += 1\n if c>0:\n result *= c+1\n\nif num > 1:\n result *= 2\nresult -= 1\nnum += 1\nfor i in range(2, int(pow(num, 0.5))+1):\n n = num\n if n%i==0:\n ...
['Wrong Answer', 'Accepted']
['s821879383', 's611925610']
[3188.0, 3828.0]
[285.0, 352.0]
[404, 466]
p02722
u459419927
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['from sys import stdin\ndef make_divisors(n):\n mod0 = set()\n mod1 = set()\n for i in range(2, int(n**0.5)+1):\n if n%i==0:\n mod0.add(i)\n mod0.add(n/i)\n if (n-1)%i==0:\n mod1.add(i)\n mod1.add((n-1)/i)\n print(mod0)\n print(mod1)\n return ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s081310750', 's222945057', 's923151183', 's139123509']
[3828.0, 3956.0, 3188.0, 3828.0]
[242.0, 243.0, 241.0, 242.0]
[571, 571, 540, 613]
p02722
u459590249
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['\ndef make_divisors(n):\n\tdivisors = []\n\tfor i in range(1, int(n**0.5)+1):\n\t\tif n % i == 0:\n\t\t\tdivisors.append(i)\n\t\t\tif i != n // i:\n\t\t\t\tdivisors.append(n//i)\n\treturn divisors\n\n\nn=int(input())\n#n%k!=0\ncnt=len(make_divisors(n-1))\n\n#n%k==0\nlst=make_divisors(n)\nfor k in lst:\n\tt=n\n\twhile...
['Time Limit Exceeded', 'Accepted']
['s384968879', 's150040788']
[3188.0, 3188.0]
[2104.0, 210.0]
[353, 367]
p02722
u471641802
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n = int(input())\na = [n]\nif n != 2:\n a.append(n - 1)\n\ndef div_(N, k):\n while N % k == 0:\n N /= k\n if N % k == 1:\n a.append(k)\n\nfor k in range(2, int(n ** 0.5) + 1):\n if n % k == 0:\n div_(n,k)\n if k != n / k:\n div_(n, n // k)\n\n if (n - 1) % k == 0:...
['Wrong Answer', 'Accepted']
['s509426816', 's451042778']
[3064.0, 3064.0]
[295.0, 303.0]
[409, 400]
p02722
u490642448
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['N = int(input())\n\ndef check(p):\n _N = N\n while _N%p == 0:\n _N //= p\n return ((_N-1)%p == 0) or (_N == 1)\n\nn = int(N**0.5)\nP0 = set([N])\nP1 = set([N-1])\nfor i in range(2, n+1):\n if N%i == 0:\n P0.add(i)\n P0.add(N//i)\n\nn = int((N-1)**0.5)\nfor i in range(2, n+1):\n if N%i == 0:\n P1.add(...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s149464556', 's238248789', 's233043452']
[4672.0, 4544.0, 3956.0]
[264.0, 282.0, 210.0]
[381, 377, 499]
p02722
u497952650
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['from copy import deepcopy\nimport numpy as np\ndef factor(N):\n ans = []\n for i in range(1,int(np.sqrt(N))+1):\n if N%i == 0:\n ans.append(i)\n if N//i != i:\n ans.append(i)\n return ans\n\ndef check(K,N):\n while 1:\n if N%K == 0:\n N = N//K\...
['Time Limit Exceeded', 'Accepted']
['s797858591', 's401236718']
[14408.0, 12476.0]
[2108.0, 338.0]
[523, 514]
p02722
u506086925
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['def make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n divisors.sort()\n return divisors\n\nn = int(input())\nnl = make_divisors(n)\nnl_p = make_divisors(n+1)\...
['Wrong Answer', 'Accepted']
['s525500381', 's607238418']
[3956.0, 4084.0]
[306.0, 209.0]
[633, 484]
p02722
u509405951
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['import math\n\nN = int(input())\n\ncnt = 0\n\nif N == 2:\n print(1)\n exit()\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\nre...
['Wrong Answer', 'Accepted']
['s655732814', 's692360466']
[3444.0, 3444.0]
[209.0, 210.0]
[621, 617]
p02722
u513519822
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['N = int(input())\nN_tmp = N\npf={}\nfor i in range(2,int(N**0.5)+1):\n while N%i==0:\n pf[i]=pf.get(i,0)+1\n N//=i\nif N>1:pf[N]=1\n\nkouho = [1]\nfor k in pf.keys():\n new_kouho = []\n for v in range(0, pf[k] + 1):\n for val in kouho:\n new_kouho.append(val * k ** v)\n ...
['Wrong Answer', 'Accepted']
['s886541931', 's841457975']
[322516.0, 3188.0]
[2119.0, 209.0]
[666, 552]
p02722
u535803878
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['from itertools import product\n\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...
['Wrong Answer', 'Accepted']
['s280213542', 's762509285']
[3188.0, 3064.0]
[195.0, 196.0]
[1012, 1019]
p02722
u550294762
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['def make_divisors(n):\n lower_divisors , upper_divisors = [], []\n i = 1\n while i*i <= n:\n if n % i == 0:\n lower_divisors.append(i)\n if i != n // i:\n upper_divisors.append(n//i)\n i += 1\n return lower_divisors + upper_divisors[::-1]\n \nn = int(inp...
['Wrong Answer', 'Accepted']
['s935456397', 's886401005']
[9216.0, 9212.0]
[296.0, 298.0]
[632, 628]
p02722
u557282438
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['N = int(input())\ncnt = 0\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\nN1_yakusu = make_divisors(N-1)\nN_yakusu = make_divisors(...
['Runtime Error', 'Accepted']
['s331540557', 's508773020']
[3188.0, 3188.0]
[208.0, 209.0]
[477, 474]
p02722
u593567568
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['import sys\nsys.setrecursionlimit(10 ** 7)\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN = int(input())\n\n\n\ndef divisor(n):\n ass = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n ass.append(i)\n if i*...
['Wrong Answer', 'Accepted']
['s771863146', 's703578512']
[3188.0, 3192.0]
[210.0, 209.0]
[641, 865]
p02722
u619144316
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['import collections\nfrom itertools import combinations\nimport math\nN = int(input())\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 ...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s092467909', 's268550301', 's946716586', 's357791375']
[3444.0, 166244.0, 3064.0, 3188.0]
[108.0, 2106.0, 300.0, 327.0]
[1158, 1297, 414, 627]
p02722
u621509924
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['N = int(input())\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n return divisors\n\nL = len(make_divisors(N))\n\nans = 0\nfor i in range(L):\n t = N\n ...
['Time Limit Exceeded', 'Accepted']
['s283320213', 's965366459']
[3188.0, 3316.0]
[2104.0, 306.0]
[483, 460]
p02722
u651109406
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['from math import sqrt\nfrom fractions import gcd\nfrom collections import Counter\n\nn = int(input()) \ntimes = 0\n\n\ndef gcd(tmpn):\n lists = []\n while True:\n end = True\n for i in range(2, int(sqrt(tmpn)) + 1):\n if tmpn % i == 0:\n lists.append(i)\n t...
['Wrong Answer', 'Accepted']
['s559170078', 's602535388']
[91596.0, 3692.0]
[2110.0, 217.0]
[1350, 574]
p02722
u686230543
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n = int(input())\n\ncount = 1\ndivisor = []\n\nd = 2\nwhile d * d < n - 1:\n if n % d == 1:\n count += 2\n d += 1\nif d * d == n:\n count += 1\n\nd = 2\nwhile d * d < n:\n if n % d == 0:\n divisor.append(d)\n divisor.append(n // d)\n d += 1\nif d * d == n:\n divisor.append(d)\ncount += 1\n\nfor d in di...
['Wrong Answer', 'Accepted']
['s046829800', 's820043969']
[9304.0, 9212.0]
[441.0, 459.0]
[381, 425]
p02722
u690536347
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['N = int(input())\nans = set()\n\ndef check(N, k):\n if k<2:\n return False\n N //= k\n while N:\n if (N-1)%k==0:\n return True\n if N%k:\n return False\n N //= k\n\nfor k in range(1, int(N**0.5)+1):\n if (N-1)%k==0:\n ans.add(k)\n ans.add((N-...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s237113060', 's322963925', 's028126161']
[9376.0, 9448.0, 9324.0]
[22.0, 2206.0, 255.0]
[452, 599, 453]
p02722
u767664985
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n ** 0.5) + 1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n // i)\n divisors.sort()\n return divisors\n\n\nN = int(input())\nans = 0\nK_cand = set(make_divisors(N) + ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s169718951', 's237792958', 's972452912']
[3856.0, 4424.0, 4424.0]
[209.0, 215.0, 219.0]
[686, 758, 543]
p02722
u887142477
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
["import numpy as np\n\nN, M = map(int, input().split())\nABC = np.zeros((N, 3))\nfor i in range(N):\n ABC[i][0], ABC[i][1], ABC[i][2] = map(int, input().split())\nDEF = np.zeros((M, 3))\nfor i in range(M):\n DEF[i][0], DEF[i][1], DEF[i][2] = map(int, input().split())\n\n\nx_co = {-10**9-1, 10**9+1}\ny_co = {-10*...
['Runtime Error', 'Accepted']
['s108547843', 's506197726']
[27180.0, 9348.0]
[108.0, 197.0]
[2219, 480]
p02722
u904547029
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n = int(input())\n\ndef divisior(n):\n a = []\n i = 1\n while (i*i <= n):\n if n%i == 0:\n a.append(i)\n if (i*i != n): a.append(n//i)\n i += 1\n\n return a\n\nans = 0\na = divisior(n).sort()\n\nfor x in a[1:]:\n tmp = n\n while (tmp%x == 0): tmp = tmp//x\n if ...
['Runtime Error', 'Accepted']
['s714441160', 's460450605']
[3188.0, 3188.0]
[183.0, 348.0]
[379, 391]
p02722
u922449550
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['N = int(input())\n\ndef check(p):\n _N = N\n while _N%p == 0:\n _N //= p\n return (_N-1)%p == 0\n\nn = int(N**0.5) + 1\nP0 = set([N])\nP1 = set([N-1])\nfor i in range(2, n+1):\n if (N-1)%i == 0:\n P1.add(i)\n P1.add((N-1)//i)\n if N%i == 0:\n P0.add(i)\n P0.add(N//i)\n\nP2.discard(1)\nP1.discard(1...
['Runtime Error', 'Accepted']
['s371177130', 's122437516']
[3828.0, 3316.0]
[303.0, 208.0]
[356, 494]
p02722
u927839462
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n=int(input())\nnlist=make_divisors(n)\nn1list=make_divisors(n-1)\n# print(nlist)\n# print(n1list)\nanswer=len(n1list)-1\nfor i in nlist[1:len(nlist)]:\n pra=n\n while (pra%i==0):\n pra=pra/i\n if pra%i==1:\n answer+=1\nprint(answer)\n', 'def make_divisors(n):\n divisors = []\n for i in r...
['Runtime Error', 'Accepted']
['s236513241', 's158614237']
[3064.0, 3316.0]
[19.0, 209.0]
[262, 501]
p02722
u928784113
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['import itertools\nfrom collections import deque,defaultdict,Counter\nfrom itertools import accumulate\nimport bisect\nfrom heapq import heappop,heappush,heapify\nimport math\nfrom copy import deepcopy\nimport queue\n#import numpy as np\n\nMod = 1000000007\ndef sieve_of_eratosthenes(n):\n if not isinstance(n,int):\...
['Runtime Error', 'Accepted']
['s760704296', 's865628841']
[9840.0, 27384.0]
[29.0, 285.0]
[2049, 2042]
p02722
u933929042
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['n = int(input())\nk = 2\ncount = 0\nwhile k * k <= n:\n if n % k == 1:\n if k == n-1 or k*k == n-1:\n count += 1\n else:\n count += 2\n elif n % k == 0:\n n_copy = n\n while n_copy % k == 0:\n n_copy //= k\n if n_copy % k == 1:\n if ...
['Wrong Answer', 'Accepted']
['s778843853', 's661968938']
[3060.0, 3064.0]
[384.0, 384.0]
[434, 343]
p02722
u934868410
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['from collections import defaultdict\n\nn = int(input())\n\n\ndef factorization_dict(k):\n ret = defaultdict(int)\n i = 2\n while k > 1 and i * i <= k:\n while k % i == 0:\n ret[i] += 1\n k //= i\n i += 1\n if k > 1:\n ret[k] += 1\n return ret\n\n\ndef factoriz...
['Wrong Answer', 'Accepted']
['s343767707', 's697831583']
[3316.0, 3188.0]
[2104.0, 649.0]
[885, 477]
p02722
u952708174
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['def f_division_or_substraction():\n N = int(input())\n\n def divisor_list(n):\n \n ret = set()\n for k in range(1, int(n**0.5) + 1):\n if n % k == 0:\n ret.update({k, n // k})\n return sorted(ret)\n\n ans = (len(divisor_list(N - 1)) - 1) \n for k in d...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s041676771', 's063126711', 's207504048']
[3580.0, 3572.0, 3580.0]
[210.0, 209.0, 209.0]
[556, 540, 576]
p02722
u955251526
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['MAX_PRIME = 10**5\nis_prime = [1] * MAX_PRIME\nprimes = []\nis_prime[0] = 0\nis_prime[1] = 0\nfor i in range(MAX_PRIME):\n if is_prime[i]:\n primes.append(i)\n for j in range(2, ((MAX_PRIME-1)//i) + 1):\n is_prime[i*j] = 0\n\ndef factorization(n):\n factor = {}\n for p in primes:\n ...
['Time Limit Exceeded', 'Accepted']
['s377268839', 's272872789']
[4188.0, 14020.0]
[2104.0, 563.0]
[1070, 1046]
p02722
u985972698
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['\n# -*- coding: utf-8 -*-\n\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n \n return divisors\n\n\nN_given = int(input())\n\n\nlist_found_K = []\n\n...
['Wrong Answer', 'Accepted']
['s396141661', 's986925562']
[3316.0, 3188.0]
[210.0, 209.0]
[1122, 972]
p02722
u989345508
2,000
1,048,576
Given is a positive integer N. We will choose an integer K between 2 and N (inclusive), then we will repeat the operation below until N becomes less than K. * Operation: if K divides N, replace N with N/K; otherwise, replace N with N-K. In how many choices of K will N become 1 in the end?
['def make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n divisors.sort()\n return divisors\n\ndef all_pattern(n):\n ans=0\n for ds in make_divisors(n):\n ...
['Runtime Error', 'Accepted']
['s379211788', 's087041677']
[3188.0, 3188.0]
[209.0, 210.0]
[484, 464]
p02723
u000040786
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['s = input()\n\nif s[2] == s[3] and s[4] == s[5]:\n print("yes")\nelse:\n print("no")', 'n=str(input())\nif n[2] == n[3] and n[4] == n[5]:\n print("yes")\nelse:\n print("no")', 'n = input()\n\nif n[2] == n[3] and n[4] == n[5]:\n print("yes")\nelse:\n print("no")', "s = input()\n \nif s[2] == s[3] and...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s040568757', 's120798500', 's509165705', 's936442937']
[2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 18.0, 17.0, 17.0]
[85, 87, 85, 88]
p02723
u004108273
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["#S = 'coffee'\n\nS = input('6文字の文字列を入力してください:')\n\nif S[2] == S[3] and S[4] == S[5] :\n print('YES')\n \nelse :\n print('No')\n ", "S = input()\n\nif S[2] == S[3] and S[4] == S[5] :\n print('Yes')\n\nelse :\n print('No')\n "]
['Wrong Answer', 'Accepted']
['s818337038', 's207074733']
[2940.0, 2940.0]
[18.0, 17.0]
[153, 87]
p02723
u004271495
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['"""\n"""\n\n\ndef int_as_array(num): return list(map(int, [y for y in str(num)]))\n\n\ndef array_as_int(arr): return int(\'\'.join(map(str, arr)))\n\n\ndef read_int(): return int(input())\n\n\ndef read_array(): return list(map(int, input().split(\' \')))\n\n\ndef array_to_string(arr, sep=\' \'): return sep.join(map(s...
['Runtime Error', 'Accepted']
['s387947489', 's554119732']
[3064.0, 3064.0]
[17.0, 18.0]
[603, 587]
p02723
u006880673
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["w = input(':')\n\nif w[2] == w[3] and w[4] == w[5]:\n print('Yes')\n \nelse :\n print('No')", "s = input()\n\nif s[2] == s[3] and s[4] == s[5]:\n print('Yes')\n \nelse :\n print('No')"]
['Wrong Answer', 'Accepted']
['s948613487', 's529083551']
[2940.0, 2940.0]
[17.0, 17.0]
[94, 85]
p02723
u014333473
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["s=input();print('NYOE S'[s[2]==s[3]and s[4]==s[5]and s[2]!=s[4]::2])", "s=input();print('NYOE S'[s[2]==s[3]and s[4]==s[5]::2])", "s=input();print('NYoe s'[s[2]==s[3]and s[4]==s[5]::2])"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s315035437', 's728092807', 's599821794']
[8776.0, 9020.0, 8960.0]
[29.0, 31.0, 27.0]
[68, 54, 54]
p02723
u015845133
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['S = list(str.imput())\n\nif S[2] == S[3]:\n if S[4] == S[5]:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")\n', 'S = list(str, input())\n\nif S[2] == S[3]:\n if S[4] == S[5]:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'S = list(input())\n\nif S[2] == S[3]:\n if S[4] == S...
['Runtime Error', 'Runtime Error', 'Accepted']
['s196752649', 's988395154', 's936701490']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 18.0]
[120, 120, 115]
p02723
u016302627
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['S = list(input().split())\nif S[2] == S[3] or S[4] == S[5]:\n print("Yes")\nelse:\n print("No")', 'S = input()\n \nif S[2]==S[3] and S[4]==S[5]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s246178776', 's075756450']
[2940.0, 2940.0]
[18.0, 17.0]
[93, 82]
p02723
u018771977
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["#! env/bin/local python3\n# -*- coding: utf-8 -*-\n\ns = input()\nif s[2] == s[3] and s[4] == 2[6]:\n print('Yes')\nelse:\n print('No')", "#! env/bin/local python3\n# -*- coding: utf-8 -*-\n\ns = input()\nif s[2] == s[3] and s[4] == s[5]:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s231259816', 's473089057']
[2940.0, 2940.0]
[17.0, 18.0]
[134, 134]
p02723
u018846452
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["s = input()\nif s[3] == s[4] and s[5] == s[6]:\n print('Yes')\nelse:\n print('No')", "s = input()\nif s[2] == s[3] and s[4] == s[5]:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s386056850', 's524982008']
[9016.0, 9020.0]
[27.0, 29.0]
[80, 80]
p02723
u020798319
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['a = str(input().split())\ns = list(a)\nprint(s)\nif s[4] == s[5] and s[7] == s[6]:\n print("Yes")\nelse :\n print("No")', 'a = str(input().split())\ns = list(a)\nif s[4] == s[5] and s[7] == s[6]:\n print("Yes")\nelse :\n print("No")']
['Wrong Answer', 'Accepted']
['s495752686', 's652992723']
[9040.0, 9056.0]
[25.0, 30.0]
[123, 114]
p02723
u021019433
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["s = input()\nprint('YNeos'[s[2::2] != s[3::2]])\n", "s = input()\nprint('YNeos'[s[2::2] != s[3::2]::2])"]
['Wrong Answer', 'Accepted']
['s109460239', 's156841083']
[2940.0, 2940.0]
[17.0, 18.0]
[47, 49]
p02723
u021763820
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['S = input()\nif S[2] == S[3] and S[4] == S[5]:\n print(Yes)\nelse:\n print(No)', 's = input()\nif s[2] == s[3] and s[4] == s[5]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s022062780', 's977848712']
[3060.0, 9032.0]
[19.0, 32.0]
[76, 80]
p02723
u021770165
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['S = input()\nif S[2]==S[3] and S[4]==S[5]:\n print("YES")\nelse:\n print("NO")', 'import sys\ninput = sys.stdin.readline\n\nS = input().split()\nif S[2]==S[3] and S[4]==S[5]:\n print("YES")\nelse:\n print("NO")', 'S = (input().split())\n\nif S[2]==S[3] and S[4]==S[5]:\n print("YES")\nelse:\n print("NO")', 's = ...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s337940104', 's381093262', 's809183112', 's033191526']
[9036.0, 9008.0, 9100.0, 9056.0]
[32.0, 22.0, 21.0, 28.0]
[76, 123, 87, 76]
p02723
u021849254
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['a=list.input()\n\nif a[2]==a[3] and a[4]==a[5]:\n print("Yes")\nelse:\n print("No")', 'a=list(input())\n \nif a[2]==a[3] and a[4]==a[5]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s248467483', 's881663594']
[9012.0, 9032.0]
[20.0, 27.0]
[80, 82]
p02723
u023751250
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['s = input()\nif(s[1:2]==s[2:3] and s[3:4]==s[4:5]){print("Yes")}\nelse{print("No")}', 's = input()\nif(s[2]==s[3] and s[4]==s[5]){print("Yes")}\nelse{print("No")}', 's = input()\nif(s[2:3]==s[3:4] and s[4:5]==s[5:6]){print("Yes")}\nelse{print("No")}', 's = input()\nif(s[2:3]==s[3:4] and s[4:5]==s[5:6]):\n print("Yes...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s234793226', 's526444645', 's983562973', 's179277727']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 18.0]
[81, 73, 81, 85]
p02723
u024450350
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["lst = list(input())\n\nif lst[2] == lst[3] and lst[4] == lst[5]:\n print('True')\nelse:\n print('No')\n", "lst = list(input())\n\nif lst[2] == lst[3] and lst[4] == lst[5]:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s002084672', 's785181976']
[2940.0, 2940.0]
[17.0, 17.0]
[103, 102]
p02723
u025484801
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['s = input()\ns.lower()\n\nif s[2] == s[3] and s[4] == s[5]:\n print("yes")\nelse:\n print("no")', 's = input()\ns.lower()\n\nif s[2] == s[3] and s[4] == s[5]:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s133109941', 's859582681']
[2940.0, 2940.0]
[17.0, 17.0]
[95, 95]
p02723
u027403702
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['S = input()\nT = input()\nhit = 0\nfor i in range(3):\n if S[i] == T[i]:\n hit = hit + 1\nprint(hit)', 'S = input()\nif S[2]==S[3] and S[4]==S[5]:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s560913122', 's316858947']
[2940.0, 2940.0]
[17.0, 17.0]
[104, 81]
p02723
u028395001
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["string = []\n\nstring = input('')\n\nif string[2] == string[3] and string[4] == string[5]:\n print('YES')\nelse:\n print('NO')", "string = []\n\nstring = input('')\n\nif string[2] == string[3] and string[4] == string[5]:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s825702637', 's429672947']
[2940.0, 2940.0]
[23.0, 17.0]
[125, 125]
p02723
u028862479
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['S = input()\n\nif S[3]==S[4] and S[5] == S[6]:\n print("Yes")\nelse:\n print("No")', 'S = input()\n\nif S[2]==S[3] and S[4] == S[5]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s183661259', 's037437407']
[9096.0, 8732.0]
[25.0, 26.0]
[79, 79]
p02723
u034459102
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["S = input()\nif len(S) != 6:\n print('No')\n return\n\nif S[2]==S[3] and S[4]==S[5]:\n print('Yes')\nelse:\n print('No')\n", "S = input()\n\nif S[2]==S[3] and S[4]==S[5] and len(S)==6 :\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s797756299', 's963084371']
[2940.0, 2940.0]
[17.0, 17.0]
[125, 97]
p02723
u036104576
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['S = input()\nif S[2] == S[3] and S[4] == S[5]:\n print("Yes")\nelse:\n print("No"', 'S = input()\nif S[2] == S[3] and S[4] == S[5]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s104807643', 's469255114']
[8864.0, 8740.0]
[27.0, 28.0]
[83, 84]
p02723
u036204887
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["a,b,c,d,e,f = input().split()\nif c == d and e == f:\n print('Yes')\nelse:\n print('No')", "a,b,c,d,e,f = list(input())\nif c == d and e == f:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s425063329', 's792979747']
[2940.0, 2940.0]
[17.0, 17.0]
[90, 88]
p02723
u039162142
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["\n\nst = input()\n\nif ( (st[2] == st[3]) and (st[4] == st[5]) ) :\n print ('YES')\nelse:\n print ('NO')", "\n\nst = input()\n\nif ( (st[2] == st[3]) and (st[4] == st[5]) ) :\n print ('Yes')\nelse:\n print ('No')"]
['Wrong Answer', 'Accepted']
['s512309225', 's938415840']
[2940.0, 2940.0]
[18.0, 18.0]
[103, 103]
p02723
u039881995
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["if num[2] == num[3] and num[-1] == num[-2]:\n print('Yes')\nelse:\n print('No')", "S = input()\nif S[2] == S[3] and S[-1] == S[-2]:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s154162647', 's142552516']
[2940.0, 2940.0]
[17.0, 17.0]
[82, 86]
p02723
u044138790
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['s = input()\nif s[3] == s[4] and s[5] == s[6]:\n print(yes)\nelse:\n print(no)', 'S = input()\nif S[3] == S[4] and S[5] == S[6]:\n print(Yes)\nelse:\n print(No)\n \n', 'n = int(input())\nm = n%500\nprint(int((n - m)*1000/ 500 + m*5//5))', "S = input()\nif S[3] == S[4] and S[5] == S[6]:\n print('Yes')\nelse:\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s222772009', 's252371366', 's579599774', 's593127518', 's861405414', 's867095187', 's485538260']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 21.0, 17.0, 18.0, 17.0, 17.0]
[77, 80, 65, 84, 89, 82, 84]
p02723
u044220565
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
["S = list(input())\ncond1 = S[2] == S[3]\ncond2 = S[3] == S[4]\nif cond1 & cond2:\n print('Yes')\nelse:\n print('No')", "S = list(input())\ncond1 = S[2] == S[3]\ncond2 = S[4] == S[5]\nif cond1 & cond2:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s809939090', 's796295476']
[2940.0, 2940.0]
[17.0, 17.0]
[112, 112]
p02723
u046158516
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['s=input()\nflag=1\nif list(s)[2]==list(s)[3]:\n if list(s)[4]==list(s)[5]:\n flag=0\nif flag=0:\n print("Yes")\nelse:\n print("No")\n \n', 'X,Y,A,B,C = map(int, input().split())\np=list(map(int,input().split()))\nq=list(map(int,input().split()))\nr=list(map(int,input().split()))\np.sort()\np.reverse()\nq.sort(...
['Runtime Error', 'Runtime Error', 'Accepted']
['s359097246', 's827665675', 's926364421']
[2940.0, 3064.0, 2940.0]
[17.0, 18.0, 18.0]
[133, 635, 74]
p02723
u057993957
2,000
1,048,576
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th characters are also equal. Given a string S, determine whether it is coffee-like.
['N, x, y = [int(i) for i in input().split()]\n\ncnt = [0] * N\nfor i in range(1, N+1):\n for j in range(i+1, N+1):\n temp = min(abs(j-i), abs(x-i) + 1 + abs(j-y), abs(y-i) + 1 + abs(j-x))\n cnt[temp] += 1\n\nfor i in range(1, N):\n print(cnt[i])', 's = input()\nprint("Yes" if s[2] == s[3] and s[4] == s[5] else...
['Runtime Error', 'Accepted']
['s842473184', 's894316109']
[3060.0, 2940.0]
[18.0, 17.0]
[243, 67]