Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02843
# -*- coding: utf-8 -*- import sys import math from bisect import bisect_left from bisect import bisect_right import collections import copy import heapq from collections import defaultdict from heapq import heappop, heappush import itertools input = sys.stdin.readline ##### リストの 二分木検索 ##### # bisect_left(lists, 3) # bisect_right(lists, 3) ##### プライオリティキュー ##### # heapq.heapify(a) #リストaのheap化 # heapq.heappush(a,x) #heap化されたリストaに要素xを追加 # heapq.heappop(a) #heap化されたリストaから最小値を削除&その最小値を出力 # heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう # heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと ##### タプルリストのソート ##### # sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順 # sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順 # sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順 # sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順 # sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順 # sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順 def inputInt(): return int(input()) def inputMap(): return map(int, input().split()) def inputList(): return list(map(int, input().split())) def main(): X = inputInt() tmp = X % 100 kai = X // 100 tmptmp = -(-tmp // 5) if tmptmp < kai: print(1) else: print(0) #print(tmptmp) #print(kai) if __name__ == "__main__": main()
# -*- coding: utf-8 -*- import sys import math from bisect import bisect_left from bisect import bisect_right import collections import copy import heapq from collections import defaultdict from heapq import heappop, heappush import itertools input = sys.stdin.readline ##### リストの 二分木検索 ##### # bisect_left(lists, 3) # bisect_right(lists, 3) ##### プライオリティキュー ##### # heapq.heapify(a) #リストaのheap化 # heapq.heappush(a,x) #heap化されたリストaに要素xを追加 # heapq.heappop(a) #heap化されたリストaから最小値を削除&その最小値を出力 # heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう # heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと ##### タプルリストのソート ##### # sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順 # sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順 # sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順 # sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順 # sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順 # sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順 def inputInt(): return int(input()) def inputMap(): return map(int, input().split()) def inputList(): return list(map(int, input().split())) def main(): X = inputInt() tmp = X % 100 kai = X // 100 tmptmp = -(-tmp // 5) if tmptmp <= kai: print(1) else: print(0) #print(tmptmp) #print(kai) if __name__ == "__main__": main()
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,355
650,356
u448994613
python
p02843
# -*- coding: utf-8 -*- import sys import math from bisect import bisect_left from bisect import bisect_right import collections import copy import heapq from collections import defaultdict from heapq import heappop, heappush import itertools input = sys.stdin.readline ##### リストの 二分木検索 ##### # bisect_left(lists, 3) # bisect_right(lists, 3) ##### プライオリティキュー ##### # heapq.heapify(a) #リストaのheap化 # heapq.heappush(a,x) #heap化されたリストaに要素xを追加 # heapq.heappop(a) #heap化されたリストaから最小値を削除&その最小値を出力 # heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう # heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと ##### タプルリストのソート ##### # sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順 # sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順 # sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順 # sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順 # sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順 # sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順 def inputInt(): return int(input()) def inputMap(): return map(int, input().split()) def inputList(): return list(map(int, input().split())) def main(): X = inputInt() tmp = X % 100 kai = X // 100 tmptmp = tmp // 5 if tmptmp <= kai: print(1) else: print(0) #print(tmp) #print(kai) if __name__ == "__main__": main()
# -*- coding: utf-8 -*- import sys import math from bisect import bisect_left from bisect import bisect_right import collections import copy import heapq from collections import defaultdict from heapq import heappop, heappush import itertools input = sys.stdin.readline ##### リストの 二分木検索 ##### # bisect_left(lists, 3) # bisect_right(lists, 3) ##### プライオリティキュー ##### # heapq.heapify(a) #リストaのheap化 # heapq.heappush(a,x) #heap化されたリストaに要素xを追加 # heapq.heappop(a) #heap化されたリストaから最小値を削除&その最小値を出力 # heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう # heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと ##### タプルリストのソート ##### # sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順 # sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順 # sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順 # sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順 # sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順 # sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順 def inputInt(): return int(input()) def inputMap(): return map(int, input().split()) def inputList(): return list(map(int, input().split())) def main(): X = inputInt() tmp = X % 100 kai = X // 100 tmptmp = -(-tmp // 5) if tmptmp <= kai: print(1) else: print(0) #print(tmptmp) #print(kai) if __name__ == "__main__": main()
[]
650,357
650,356
u448994613
python
p02843
# -*- coding: utf-8 -*- import sys import math from bisect import bisect_left from bisect import bisect_right import collections import copy import heapq from collections import defaultdict from heapq import heappop, heappush import itertools input = sys.stdin.readline ##### リストの 二分木検索 ##### # bisect_left(lists, 3) # bisect_right(lists, 3) ##### プライオリティキュー ##### # heapq.heapify(a) #リストaのheap化 # heapq.heappush(a,x) #heap化されたリストaに要素xを追加 # heapq.heappop(a) #heap化されたリストaから最小値を削除&その最小値を出力 # heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう # heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと ##### タプルリストのソート ##### # sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順 # sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順 # sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順 # sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順 # sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順 # sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順 def inputInt(): return int(input()) def inputMap(): return map(int, input().split()) def inputList(): return list(map(int, input().split())) def main(): X = inputInt() tmp = X % 100 kai = X // 100 tmptmp = tmp // 5 if tmptmp < kai: print(1) else: print(0) #print(tmp) #print(kai) if __name__ == "__main__": main()
# -*- coding: utf-8 -*- import sys import math from bisect import bisect_left from bisect import bisect_right import collections import copy import heapq from collections import defaultdict from heapq import heappop, heappush import itertools input = sys.stdin.readline ##### リストの 二分木検索 ##### # bisect_left(lists, 3) # bisect_right(lists, 3) ##### プライオリティキュー ##### # heapq.heapify(a) #リストaのheap化 # heapq.heappush(a,x) #heap化されたリストaに要素xを追加 # heapq.heappop(a) #heap化されたリストaから最小値を削除&その最小値を出力 # heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう # heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと ##### タプルリストのソート ##### # sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順 # sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順 # sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順 # sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順 # sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順 # sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順 def inputInt(): return int(input()) def inputMap(): return map(int, input().split()) def inputList(): return list(map(int, input().split())) def main(): X = inputInt() tmp = X % 100 kai = X // 100 tmptmp = -(-tmp // 5) if tmptmp <= kai: print(1) else: print(0) #print(tmptmp) #print(kai) if __name__ == "__main__": main()
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,358
650,356
u448994613
python
p02843
X = int(input()) count = 0 while X > 100: X -= 100 count += 1 if count * 5 >= X: print(1) else: print(0)
X = int(input()) count = 0 while X >= 100: X -= 100 count += 1 if count * 5 >= X: print(1) else: print(0)
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
650,381
650,382
u515207244
python
p02843
X = int(input()) count = 0 while X > 100: X -= 100 count += 1 if count * 5 > X: print(1) else: print(0)
X = int(input()) count = 0 while X >= 100: X -= 100 count += 1 if count * 5 >= X: print(1) else: print(0)
[ "expression.operator.compare.change", "control_flow.loop.condition.change", "control_flow.branch.if.condition.change" ]
650,383
650,382
u515207244
python
p02843
# -*- coding: utf-8 -*- N = int(input()) if N // 101 > N // 105: print(1) elif N % 105 == 0: print(1) else: print(0)
# -*- coding: utf-8 -*- N = int(input()) if N // 100 > N // 105: print(1) elif N % 105 == 0: print(1) else: print(0)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
650,386
650,387
u811817592
python
p02843
import math x = int(input()) num = x // 100 amari = x % 100 # print(num,amari) print(1 if math.ceil(amari/5) < num else 0)
import math x = int(input()) num = x // 100 amari = x % 100 # print(num,amari) print(1 if math.ceil(amari/5) <= num else 0)
[ "expression.operator.compare.change", "call.arguments.change", "io.output.change" ]
650,390
650,391
u118211443
python
p02843
x=int(input()) n=x//100 m=x//105 print(n,m) for i in range(m,n+1): if 100*i<=x<=105*i: print(1) exit() print(0)
x=int(input()) n=x//100 m=x//105 for i in range(m,n+1): if 100*i<=x<=105*i: print(1) exit() print(0)
[ "call.remove" ]
650,396
650,397
u961674365
python
p02843
X = int(input()) N = X // 100 M = X % 100 if M < 5 * N: print(1) else: print(0)
X = int(input()) N = X // 100 M = X % 100 if M <= 5 * N: print(1) else: print(0)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,409
650,410
u019637926
python
p02843
import sys input = sys.stdin.readline x = int(input()) two_bit = x%100 five = two_bit//5 two_bit-= 5*five if two_bit==0: amari = 0 else: amari = 1 if (five+amari) < x//100: print(1) else: print(0)
import sys input = sys.stdin.readline x = int(input()) two_bit = x%100 five = two_bit//5 two_bit-= 5*five if two_bit==0: amari = 0 else: amari = 1 if (five+amari) <= x//100: print(1) else: print(0)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,415
650,416
u102275718
python
p02843
n = int(input()) r = n%100 h = n-r print((r<=(h*5))*1)
n = int(input()) r = n%100 h = (n-r)//100 print((r<=(h*5))*1)
[ "assignment.change" ]
650,421
650,422
u115110170
python
p02843
x = int(input()) c = [100, 101, 102, 103, 104, 105] INF = float("inf") dp = [INF]*(x+1) dp[0] = 0 for i in range(len(c)): for j in range(x+1): if j - c[i] < 0: continue else: dp[j] = min(dp[j], dp[j - c[i]] + 1) if x == INF: print(0) else: print(1)
x = int(input()) c = [100, 101, 102, 103, 104, 105] INF = float("inf") dp = [INF]*(x+1) dp[0] = 0 for i in range(len(c)): for j in range(x+1): if j - c[i] < 0: continue else: dp[j] = min(dp[j], dp[j - c[i]] + 1) if dp[x] == INF: print(0) else: print(1)
[ "control_flow.branch.if.condition.change" ]
650,439
650,440
u794173881
python
p02843
x = int(input()) res = [False for i in range(x + 1)] res[0] = True for i in range(100, 106): res[i] = True for i in range(106, x + 1): res[i] = res[i-100] or res[i-101] or res[i-102] or res[i-103] or res[i-104] or res[i-105] if res[x]: print(1) else: print(0)
x = int(input()) res = [False for i in range(x + 1)] res[0] = True for i in range(100, 106): if x < i: break res[i] = True for i in range(106, x + 1): res[i] = res[i-100] or res[i-101] or res[i-102] or res[i-103] or res[i-104] or res[i-105] if res[x]: print(1) else: print(0)
[ "control_flow.branch.if.add", "control_flow.break.add" ]
650,441
650,442
u996672406
python
p02843
m = int(input()) f = [0] * (m + 1) f[0] = 1 for x in range(100, 106): for i in range(m, x - 1, -1): f[i] = max(f[i - x], f[i]) print(f[m])
m = int(input()) f = [0] * (m + 1) f[0] = 1 for x in range(100, 106): for i in range(x, m + 1): f[i] = max(f[i - x], f[i]) print(f[m])
[ "call.arguments.change", "expression.operation.binary.remove", "control_flow.loop.range.bounds.step.change", "control_flow.loop.range.bounds.upper.change" ]
650,447
650,448
u891482208
python
p02843
x=int(input()) buy=x//100 if x%10<buy: print(1) else: print(0)
x=int(input()) buy=x//100 if x%100<=buy*5: print(1) else: print(0)
[ "control_flow.branch.if.condition.change" ]
650,465
650,466
u296150111
python
p02843
x = int(input()) y = x % 100 z = x // 100 print(y, z) if z * 5 >= y: print(1) else: print(0)
x = int(input()) y = x % 100 z = x // 100 if z * 5 >= y: print(1) else: print(0)
[ "call.remove" ]
650,471
650,472
u970523279
python
p02843
X=int(input()) x=X%100 i=0 for i in range(5,0,-1): i+=x//i x=x%i if X//100>i: print(1) else: print(0)
X=int(input()) x=X%100 i=0 for j in range(5,0,-1): i+=x//j x=x%j if X//100>=i: print(1) else: print(0)
[ "identifier.change", "expression.operation.binary.change", "assignment.value.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,473
650,474
u069172538
python
p02843
x = int(input()) n = x // 100 kingaku = x - n * 100 if n <= kingaku <= n * 5: print(1) else: print(0)
x = int(input()) n = x // 100 kingaku = x - n * 100 if kingaku <= n * 5: print(1) else: print(0)
[]
650,483
650,484
u761989513
python
p02843
n = int(input()) a = n//100 if a*100 < n < a*105: print('1') else: print('0')
n = int(input()) a = n//100 if a*100 <= n <= a*105: print('1') else: print('0')
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,487
650,488
u240793404
python
p02843
import math import sys x = int(input()) syou = x //100 r = x % 100 if syou * 5 > r: print(1) else: print(0)
import math import sys x = int(input()) syou = x //100 r = x % 100 if syou * 5 >= r: print(1) else: print(0)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,489
650,490
u952491523
python
p02843
N = int(input()) q, mod = divmod(N, 100) print(1 if mod < q * 5 else 0)
N = int(input()) q, mod = divmod(N, 100) print(1 if mod <= q * 5 else 0)
[ "expression.operator.compare.change", "call.arguments.change", "io.output.change" ]
650,503
650,504
u716529032
python
p02843
X = int(input()) simo = X%100 uwa = (X - simo) // 100 syou = (simo // 5) if uwa >= syou: print(1) else: print(0)
X = int(input()) simo = X%100 uwa = (X - simo) // 100 syou = ((simo-1) // 5) if uwa > syou: print(1) else: print(0)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,532
650,533
u698902360
python
p02843
x = int(input()) dp = [0]*(x+106) dp[0] = 1 for i in range(x+1): if(dp[i]): for tmp in [100, 101, 102, 103, 104, 105]: dp[i+tmp] = 1 print(dp[x+1])
x = int(input()) dp = [0]*(x+106) dp[0] = 1 for i in range(x+1): if(dp[i]): for tmp in [100, 101, 102, 103, 104, 105]: dp[i+tmp] = 1 print(dp[x])
[ "expression.operation.binary.remove" ]
650,536
650,537
u931462344
python
p02843
X = int(input()) dp = [False]*(X+1) dp[0] = True for i in range(1, X+1): if i-100 < 0: dp[i] = False else: dp[i] = (dp[i-100] or dp[i-101] or dp[i-102] or dp[i-103] or dp[i-104] or dp[i-105]) print(dp[X])
X = int(input()) dp = [False]*(X+1) dp[0] = True for i in range(1, X+1): if i-100 < 0: dp[i] = False else: dp[i] = (dp[i-100] or dp[i-101] or dp[i-102] or dp[i-103] or dp[i-104] or dp[i-105]) print(int(dp[X]))
[ "call.arguments.add", "call.arguments.change" ]
650,548
650,549
u847758719
python
p02843
x = int(input()) c = x // 100 if 100*c <= x and x <= 105*c: print(105*c) exit(0) print(0)
x = int(input()) c = x // 100 if 100*c <= x and x <= 105*c: print(1) exit(0) print(0)
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change", "expression.operation.binary.remove" ]
650,550
650,551
u613637815
python
p02843
x = int(input()) f = (x%100)//5 ff = (x%100)%5 a = [0,101,102,103,104] if 105*f+a[ff]*ff <= x: print(1) else: print(0)
x = int(input()) f = (x%100)//5 ff = (x%100)%5 a = [0,101,102,103,104] if 105*f+a[ff]<= x: print(1) else: print(0)
[ "expression.operation.binary.remove" ]
650,554
650,555
u818349438
python
p02843
X = int(input()) m = X % 100 S = 0 for i in range(1, 6)[:: -1]: S += (100 + i) * (m // i) m -= m // i if S > X: print('0') else: print('1')
X = int(input()) m = X % 100 S = 0 for i in range(1, 6)[:: -1]: S += (100 + i) * (m // i) m -= m // i * i if S > X: print('0') else: print('1')
[ "expression.operation.binary.add" ]
650,579
650,580
u392319141
python
p02843
X = int(input()) m = X % 100 S = 0 for i in range(1, 6)[:: -1]: S += (100 + i) * (m % i) m -= m % i if S > X: print('0') else: print('1')
X = int(input()) m = X % 100 S = 0 for i in range(1, 6)[:: -1]: S += (100 + i) * (m // i) m -= m // i * i if S > X: print('0') else: print('1')
[ "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
650,581
650,580
u392319141
python
p02843
from itertools import combinations_with_replacement as comb def f(n, h): for i in comb(range(1, 6), n): if sum(i) == h: return 1 return 0 if __name__ == '__main__': x = int(input()) n = x // 100 h = x - 100 * n print(f(n, h))
from itertools import combinations_with_replacement as comb def f(n, h): for i in comb(range(6), n): if sum(i) == h: return 1 return 0 if __name__ == '__main__': x = int(input()) n = x // 100 h = x - 100 * n print(f(n, h))
[ "call.arguments.change" ]
650,584
650,585
u843981036
python
p02843
x = int(input()) n = x//100 + 1 for i in range(n): for j in range(n): for k in range(n): for l in range(n): for m in range(n): c = 100*i + 101*j + 102*k + 103*l + 104*m if x > c: t = x-c if t%105 == 0: print(1) exit() print(0)
x = int(input()) n = x//100 + 1 for i in range(n): for j in range(n): for k in range(n): for l in range(n): for m in range(n): c = 100*i + 101*j + 102*k + 103*l + 104*m if x >= c: t = x-c if t%105 == 0: print(1) exit() print(0)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,591
650,592
u368796742
python
p02843
x = int(input()) n = x//100 + 1 for i in range(n): for j in range(n): for k in range(n): for l in range(n): for m in range(n): c = 100*i + 101*j + 102*k + 103*l + 104*m t = x-c if t%105 == 0: print(1) exit() print(0)
x = int(input()) n = x//100 + 1 for i in range(n): for j in range(n): for k in range(n): for l in range(n): for m in range(n): c = 100*i + 101*j + 102*k + 103*l + 104*m if x >= c: t = x-c if t%105 == 0: print(1) exit() print(0)
[ "control_flow.branch.if.add" ]
650,593
650,592
u368796742
python
p02843
x = int(input()) quo = x // 100 rem = x % 100 req = rem // 5 if rem % 5: req += 1 if req > qum: print(0) else: print(1)
x = int(input()) quo = x // 100 rem = x % 100 req = rem // 5 if rem % 5: req += 1 if req > quo: print(0) else: print(1)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
650,600
650,601
u353402627
python
p02843
x = int(input()) quo = x // 100 rem = u % 100 req = rem // 5 if rem % 5: req += 1 if req > qum: print(0) else: print(1)
x = int(input()) quo = x // 100 rem = x % 100 req = rem // 5 if rem % 5: req += 1 if req > quo: print(0) else: print(1)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change" ]
650,602
650,601
u353402627
python
p02843
# coding: utf-8 X = int(input()) q = X//100 mod = X%100 if q*5 > mod: print(1) else: print(0)
# coding: utf-8 X = int(input()) q = X//100 mod = X%100 if q*5 >= mod: print(1) else: print(0)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,608
650,609
u216136179
python
p02843
# coding: utf-8 X = input(S) q = X//100 mod = X%100 if q*5 > mod: print(1) else: print(0)
# coding: utf-8 X = int(input()) q = X//100 mod = X%100 if q*5 >= mod: print(1) else: print(0)
[ "call.add", "assignment.value.change", "call.arguments.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,610
650,609
u216136179
python
p02843
A = 13686784449508840134535141032768775559720151357411287890658150001560459561020153045905603435404123030200610562432254201427071052237294447412334049909610097560356123011339726961041294276995998978681928162865195994813010196847182141514372891432895266200835012616119057918511600926094935589261029156595432300180276957054843952600637987375789295618125775584040424260405298047333745181016738145357022272987071440607502135421833617185794856938596929955612758657322356202211572781885965905950274302497904276173920267296140155384562533798666020431711631818479842160768230849308321711828609914806776889345 N = int(input()) print(1 if N >= 2000 else A>>N & 1)
A = 7175816845464090776455207507270117755723765735430536804658747273399161802972634276448409301356909248005606116656073561929444931323143190717332175076262060295351620527202705615498306139275508555689509950694997345595674093104433020700546656778950085095645658807229584194806623377338842753774743833376783450229118372573460572454731223569400078753907185233376010906274531347459925723690095854183385568140762360863180004465626012327328449425540345922055914421850333689171725134946657507151835356233535112180627200151906292121106447641907908790376379132422532166122413876168625333717615295123397246508335105 N = int(input()) print(1 if N >= 2000 else A>>N & 1)
[ "literal.number.integer.change", "assignment.value.change" ]
650,611
650,612
u864197622
python
p02843
n=int(input()) a=n//100 b=n%100 print(b<=a*5)
n=int(input()) a=n//100 b=n%100 print((int)(b<=a*5))
[ "call.arguments.add", "call.arguments.change" ]
650,622
650,623
u859897687
python
p02843
import math x = int(input()) c = math.floor(x / 105) if 100*c <= x <= 105*c: print(1) else: print(0)
import math x = int(input()) c = math.floor(x / 100) if 100*c <= x <= 105*c: print(1) else: print(0)
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
650,628
650,629
u593934357
python
p02843
s=int(input()) import math print(int(math.ceil(s%100+1)//5*100<=s))
s=int(input()) print(int((s%100+4)//5*100<=s))
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change" ]
650,647
650,646
u941407962
python
p02843
s=int(input()) print(int((s%100+1)//5*100<=s))
s=int(input()) print(int((s%100+4)//5*100<=s))
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
650,648
650,646
u941407962
python
p02843
X = int(input()) X_mod = X%100 X_count = X//100 count = 0 for i in reversed(range(2,6)): count += X_mod//i X_mod = X_mod%i ans = 0 if count <= X_count: ans = 1 else: ans = 0 print(ans)
X = int(input()) X_mod = X%100 X_count = X//100 count = 0 for i in reversed(range(1,6)): count += X_mod//i X_mod = X_mod%i ans = 0 if count <= X_count: ans = 1 else: ans = 0 print(ans)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
650,651
650,652
u960653324
python
p02843
n=int(input());print(+(n//100*6>n%100))
n=int(input());print(+(n//100*5>=n%100))
[]
650,655
650,654
u729133443
python
p02843
dp=[0 for i in range(100001)] dp[0]=1 a=[i for i in range(100,106)] for i in range(100001): if dp[i]==1: for j in a: dp[i+j]=1 print(dp[int(input())])
dp=[0 for i in range(100110)] dp[0]=1 a=[i for i in range(100,106)] for i in range(100000): if dp[i]==1: for j in a: dp[i+j]=1 print(dp[int(input())])
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
650,659
650,660
u422104747
python
p02843
n = int(input()) tmp=n//100 mod=n%100/5 if(mod<tmp): print(1) else: print(0)
n = int(input()) tmp=n//100 mod=n%100/5 if(mod<=tmp): print(1) else: print(0)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,663
650,664
u103208639
python
p02843
import sys import math n=int(input()) a=n%100 b=math.floor(n/100) f=True while b != 0: for i in range(b): for j in range(b-i): for k in range(b-i-j): for l in range(b-i-j-k): for m in range(b-i-j-k-l): if i+2*j+3*k+4*l+5*m == a: print(1) sys.exit() a+=100 b-=1 print(0)
import sys import math n=int(input()) a=n%100 b=math.floor(n/100)+1 f=True while b != 0: for i in range(b): for j in range(b-i): for k in range(b-i-j): for l in range(b-i-j-k): for m in range(b-i-j-k-l): if i+2*j+3*k+4*l+5*m == a: print(1) sys.exit() a+=100 b-=1 print(0)
[ "assignment.change" ]
650,669
650,670
u148218179
python
p02843
import math def main(): X = int(input()) count = math.floor(X / 100) if ((X > 100 * count) and (X < 105 * count)): print(1) else: print(0) main()
import math def main(): X = int(input()) count = math.floor(X / 100) if ((X >= 100 * count) and (X <= 105 * count)): print(1) else: print(0) main()
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,708
650,709
u539805724
python
p02843
import math def main(): X = int(input()) count = math.floor(X / 100) if ((X > 100 * count) and X < (105 * count)): print(1) else: print(0) main()
import math def main(): X = int(input()) count = math.floor(X / 100) if ((X >= 100 * count) and (X <= 105 * count)): print(1) else: print(0) main()
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,710
650,709
u539805724
python
p02843
x = int(input()) cnt = x // 100 y = x - 100 * cnt if cnt * 5 > y: print(1) else: print(0)
x = int(input()) cnt = x // 100 y = x - 100 * cnt if cnt * 5 >= y: print(1) else: print(0)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
650,715
650,716
u440551778
python
p02843
X = int(input()) q = X // 100 r = X % 100 if q*6 < r: print(0) else: print(1)
X = int(input()) q = X // 100 r = X % 100 if q*5 < r: print(0) else: print(1)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
650,744
650,745
u504836877
python
p02844
n = int(input()) s = input() ans = 0 for i in range(10): a = s.find(str(i)) for j in range(10): b = s.find(str(j), a+1, n) for k in range(10): c = s.find(str(k), b+1, n) if a == -1 or b == -1 or c == -1: continue else: ans += 1 print(ans)
n = int(input()) s = input() ans = 0 for i in range(10): a = s.find(str(i)) for j in range(10): b = s.find(str(j), a+1) for k in range(10): c = s.find(str(k), b+1) if a == -1 or b == -1 or c == -1: continue else: ans += 1 print(ans)
[ "call.arguments.change" ]
650,764
650,765
u468972478
python
p02844
n=int(input()) s=list(input()) d={} ans=0 for x in range(n-2): if s[x] not in d: d[s[x]]=0 for y in range(x+1,n-1): if int(s[x]+s[y]) not in d: d[int(s[x]+s[y])]=0 for z in range(y+1,n): if int(s[x]+s[y]+s[z]) not in d: d[int(s[x]+s[y]+s[z])]=0 ans+=1 print(ans)
n=int(input()) s=list(input()) d={} ans=0 for x in range(n-2): if s[x] not in d: d[s[x]]=0 for y in range(x+1,n-1): if (s[x]+s[y]) not in d: d[(s[x]+s[y])]=0 for z in range(y+1,n): if (s[x]+s[y]+s[z]) not in d: d[(s[x]+s[y]+s[z])]=0 ans+=1 print(ans)
[ "control_flow.branch.if.condition.change" ]
650,768
650,769
u516554284
python
p02844
import sys sys.setrecursionlimit(10**9) def mi(): return map(int,input().split()) def ii(): return int(input()) def isp(): return input().split() def deb(text): print("-------\n{}\n-------".format(text)) INF=10**20 def main(): N=ii() S=list(input()) ans = 0 for i in range(1,1000): pin = str(i) if len(pin) == 1: pin = "00"+pin elif len(pin) == 2: pin = "0"+pin waiti = 0 for j in range(N): if S[j] == pin[waiti]: waiti += 1 if waiti == 3: break if waiti == 3: ans += 1 print(ans) if __name__ == "__main__": main()
import sys sys.setrecursionlimit(10**9) def mi(): return map(int,input().split()) def ii(): return int(input()) def isp(): return input().split() def deb(text): print("-------\n{}\n-------".format(text)) INF=10**20 def main(): N=ii() S=list(input()) ans = 0 for i in range(1000): pin = str(i) if len(pin) == 1: pin = "00"+pin elif len(pin) == 2: pin = "0"+pin waiti = 0 for j in range(N): if S[j] == pin[waiti]: waiti += 1 if waiti == 3: break if waiti == 3: ans += 1 print(ans) if __name__ == "__main__": main()
[ "call.arguments.change" ]
650,770
650,771
u997648604
python
p02844
import math import sys import collections import bisect import sympy readline = sys.stdin.readline def main(): n = int(readline().rstrip()) s = readline() cnt = 0 for i in range(1000): x = str(i).zfill(3) a = s[:-1].find(x[0]) if a != -1: b = s[a + 1: -1].find(x[1]) if b != -1: c = s[a + b + 2:].find(x[2]) if c != -1: cnt += 1 print(cnt) if __name__ == '__main__': main()
import math import sys import collections import bisect readline = sys.stdin.readline def main(): n = int(readline().rstrip()) s = readline().rstrip() cnt = 0 for i in range(1000): x = str(i).zfill(3) a = s[:-1].find(x[0]) if a != -1: b = s[a + 1: -1].find(x[1]) if b != -1: c = s[a + b + 2:].find(x[2]) if c != -1: cnt += 1 print(cnt) if __name__ == '__main__': main()
[ "call.add" ]
650,772
650,773
u395202850
python
p02844
import math import sys import collections import bisect import sympy readline = sys.stdin.readline def main(): n = int(readline().rstrip()) s = readline().rstrip() cnt = 0 for i in range(1000): x = str(i).zfill(3) a = s[:-1].find(x[0]) if a != -1: b = s[a + 1: -1].find(x[1]) if b != -1: c = s[a + b + 2:].find(x[2]) if c != -1: cnt += 1 print(cnt) if __name__ == '__main__': main()
import math import sys import collections import bisect readline = sys.stdin.readline def main(): n = int(readline().rstrip()) s = readline().rstrip() cnt = 0 for i in range(1000): x = str(i).zfill(3) a = s[:-1].find(x[0]) if a != -1: b = s[a + 1: -1].find(x[1]) if b != -1: c = s[a + b + 2:].find(x[2]) if c != -1: cnt += 1 print(cnt) if __name__ == '__main__': main()
[]
650,774
650,773
u395202850
python
p02844
n=int(input()) s=input() score = 0 for p in range(1000): pw = str(p).zfill(3) start = 0 n_match = 0 for j in range(3): for i in range(start, len(s)): if s[i] == pw[j]: start = i+1 n_match = n_match+1 if j == 3-1: print(pw) score = score+1 break if n_match <= j: break print(score)
n=int(input()) s=input() score = 0 for p in range(1000): pw = str(p).zfill(3) start = 0 n_match = 0 for j in range(3): for i in range(start, len(s)): if s[i] == pw[j]: start = i+1 n_match = n_match+1 if j == 3-1: # print(pw) score = score+1 break if n_match <= j: break print(score)
[ "call.remove" ]
650,775
650,776
u474202990
python
p02844
N=int(input()) S=list(input()) numlist=range(1000) ans=0 for i in numlist: num=str(i) if len(num)==1: num="00"+num if len(num)==2: num="0"+num if num[0] in S[:N-1]: num1=S.index(num[0]) if num[1] in S[num1+1:N-1]: S2=S[num1+1:N-1] num2=S2.index(num[1])+num1+1 if num[2] in S[num2+1:]: ans+=1 print(i) print(ans)
N=int(input()) S=list(input()) numlist=range(1000) ans=0 for i in numlist: num=str(i) if len(num)==1: num="00"+num if len(num)==2: num="0"+num if num[0] in S[:N-1]: num1=S.index(num[0]) if num[1] in S[num1+1:N-1]: S2=S[num1+1:N-1] num2=S2.index(num[1])+num1+1 if num[2] in S[num2+1:]: ans+=1 print(ans)
[ "call.remove" ]
650,783
650,784
u111652094
python
p02844
N = int(input()) S = input() cnt = [0]*11 i = 0 T = '' for s in S: cnt[int(s)]+=1 if min(cnt)<=3: T += s print(T) ans = 0 P = [] for a in range(10): A = str(a) k = 0 ind1 = -1 while k < len(T)-2: t = T[k] if A == t: ind1 = k break k += 1 if ind1 == -1: continue for b in range(10): B = str(b) l = ind1+1 ind2 = -1 while l < len(T)-1: t = T[l] if B == t: ind2 = l break l += 1 #print(a,b,ind1,ind2) if ind2 == -1: continue for c in range(10): C = str(c) m = ind2+1 while m < len(T): t = T[m] if C == t: ans += 1 break m += 1 print(ans) #print(*ans, sep='/n')
N = int(input()) S = input() cnt = [0]*11 i = 0 T = '' for s in S: cnt[int(s)]+=1 if min(cnt)<=3: T += s #print(T) ans = 0 P = [] for a in range(10): A = str(a) k = 0 ind1 = -1 while k < len(T)-2: t = T[k] if A == t: ind1 = k break k += 1 if ind1 == -1: continue for b in range(10): B = str(b) l = ind1+1 ind2 = -1 while l < len(T)-1: t = T[l] if B == t: ind2 = l break l += 1 #print(a,b,ind1,ind2) if ind2 == -1: continue for c in range(10): C = str(c) m = ind2+1 while m < len(T): t = T[m] if C == t: ans += 1 break m += 1 print(ans)
[ "call.remove" ]
650,789
650,790
u678167152
python
p02844
import sys import copy input = sys.stdin.readline N=int(input()) S=input() T=[[0] * 10 for _ in range(30000)] for i in range(N): if i!=0: T[i]=copy.deepcopy(T[i-1]) T[i][int(S[i])]+=1 #print(T) dic={} flag=[False]*10 for i in range(N-2): if flag[int(S[i])]==True: continue flag[int(S[i])]=True for j in range(i+1,N-1): tmp2=copy.deepcopy(T[N-1]) tmp3=copy.deepcopy(T[j]) tmp4="" for k in range(10): if tmp2[k]-tmp3[k]!=0: tmp4=S[i]+S[j]+str(k) if tmp4 in dic: pass else: dic[tmp4]=1 print(len(dic)-1)
import sys import copy input = sys.stdin.readline N=int(input()) S=input() T=[[0] * 10 for _ in range(30000)] for i in range(N): if i!=0: T[i]=copy.deepcopy(T[i-1]) T[i][int(S[i])]+=1 #print(T) dic={} flag=[False]*10 for i in range(N-2): if flag[int(S[i])]==True: continue flag[int(S[i])]=True for j in range(i+1,N-1): tmp2=copy.deepcopy(T[N-1]) tmp3=copy.deepcopy(T[j]) tmp4="" for k in range(10): if tmp2[k]-tmp3[k]!=0: tmp4=S[i]+S[j]+str(k) #print(tmp4) if tmp4 in dic: pass else: dic[tmp4]=1 print(len(dic)) #print(dic)
[ "expression.operation.binary.remove" ]
650,795
650,796
u013513417
python
p02844
n = int(input()) S = input() ans = 0 for i in range(1,1000): t = str(i).zfill(3) for s in S: if s == t[0]: t = t[1:] if t == '': ans += 1 break print(ans)
n = int(input()) S = input() ans = 0 for i in range(1000): t = str(i).zfill(3) for s in S: if s == t[0]: t = t[1:] if t == '': ans += 1 break print(ans)
[ "call.arguments.change" ]
650,797
650,798
u747703115
python
p02844
import collections n = int(input()) s_list = list(input()) ans = 0 for i in range(1000): key = str(i).zfill(3) k = 0 t = key[k] for s in s_list: if t == s[j]: k += 1 if k == 3: ans += 1 break t = key[k] print(ans)
n = int(input()) s_list = list(input()) ans = 0 for i in range(1000): key = str(i).zfill(3) k = 0 t = key[k] for s in s_list: if t == s: k += 1 if k == 3: ans += 1 break t = key[k] print(ans)
[ "control_flow.loop.for.condition.change" ]
650,805
650,806
u940831163
python
p02844
N=int(input()) S=input() re_list=[] ele = list(map(str, S)) v_list=[] vi_list=[] flag = 0 count = 0 for i in range(1000): if i < 10: v_list.append("00"+str(i+1)) elif i < 100: v_list.append("0" + str(i + 1)) else: v_list.append(str(i+1)) for i in range(1000): for j in range(N): if ele[j] == v_list[i][0] and flag == 0: flag = 1 continue if ele[j] == v_list[i][1] and flag == 1: flag = 2 continue if ele[j] == v_list[i][2] and flag == 2: count += 1 break flag = 0 print(count)
N=int(input()) S=input() re_list=[] ele = list(map(str, S)) v_list=[] vi_list=[] flag = 0 count = 0 for i in range(1000): if i < 10: v_list.append("00"+str(i)) elif i < 100: v_list.append("0" + str(i)) else: v_list.append(str(i)) for i in range(1000): for j in range(N): if ele[j] == v_list[i][0] and flag == 0: flag = 1 continue if ele[j] == v_list[i][1] and flag == 1: flag = 2 continue if ele[j] == v_list[i][2] and flag == 2: count += 1 break flag = 0 print(count)
[ "expression.operation.binary.remove" ]
650,809
650,810
u918373199
python
p02844
n = int(input()) s = input() ans = 0 for i in range(10): for j in range(10): for k in range(10): for f in range(n): if p == 0 and s[f] == str(i): p = 1 elif p == 1 and s[f] == str(j): p = 2 elif p == 2 and s[f] == str(k): ans += 1 break print(ans)
n = int(input()) s = input() ans = 0 for i in range(10): for j in range(10): for k in range(10): p=0 for f in range(n): if p == 0 and s[f] == str(i): p = 1 elif p == 1 and s[f] == str(j): p = 2 elif p == 2 and s[f] == str(k): ans += 1 break print(ans)
[ "assignment.add" ]
650,829
650,830
u306950978
python
p02844
n = int(input()) s = input() ans =0 for i in range(10): if str(i) in s: t = s[s.index(str(i))+1:] for j in range(10): if str(j) in s: u = t[t.index(str(j))+1:] for k in range(10): if str(k) in u: ans += 1 print(ans)
n = int(input()) s = input() ans =0 for i in range(10): if str(i) in s: t = s[s.index(str(i))+1:] for j in range(10): if str(j) in t: u = t[t.index(str(j))+1:] for k in range(10): if str(k) in u: ans += 1 print(ans)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
650,848
650,849
u516566941
python
p02844
N = int(input()) S = [s for s in input()] lis = [str(i)+str(j)+str(k) for i in range(10) for j in range(10) for k in range(10)] ans = 0 from collections import defaultdict d = defaultdict(list) for i,s in enumerate(S): d[s].append(i) for s in lis: if d[s[0]]: i = min(d[s][0]) if d[s[1]]: for j in d[s[1]]: if j > i: if d[s[2]]: if max(d[s[2]]) > j: ans += 1 break break else:continue else:continue print(ans)
N = int(input()) S = [s for s in input()] lis = [str(i)+str(j)+str(k) for i in range(10) for j in range(10) for k in range(10)] ans = 0 from collections import defaultdict d = defaultdict(list) for i,s in enumerate(S): d[s].append(i) for s in lis: if d[s[0]]: i = min(d[s[0]]) if d[s[1]]: for j in d[s[1]]: if j > i: if d[s[2]]: if max(d[s[2]]) > j: ans += 1 break break else:continue else:continue print(ans)
[ "call.arguments.change" ]
650,854
650,855
u704284486
python
p02844
def resolve(): N = int(input()) S = input() ans = 0 for i in range(1001): pw = str(i).zfill(3) pw_ind = 0 for s in S: if s == pw[pw_ind]: pw_ind += 1 if pw_ind == 3: break if pw_ind == 3: ans += 1 return print(ans) if __name__ == "__main__": resolve()
def resolve(): N = int(input()) S = input() ans = 0 for i in range(1000): pw = str(i).zfill(3) pw_ind = 0 for s in S: if s == pw[pw_ind]: pw_ind += 1 if pw_ind == 3: break if pw_ind == 3: ans += 1 return print(ans) if __name__ == "__main__": resolve()
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
650,893
650,894
u581187895
python
p02844
import re import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal import functools def v(): return input() def k(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def X(): return list(input()) def L(): return list(input().split()) def l(): return list(map(int,input().split())) def lcm(a,b): return a*b//math.gcd(a,b) sys.setrecursionlimit(10 ** 6) mod = 10**9+7 cnt = 1 ans = 0 inf = float("inf") al = "abcdefghijklmnopqrstuvwxyz" AL = al.upper() n = k() s = v() s1,s2,s3 = set(),set(),set() for x in S: for z in s2: s3.add(z+x) for y in s1: s2.add(y+x) s1.add(x) print(len(s3))
import re import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal import functools def v(): return input() def k(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def X(): return list(input()) def L(): return list(input().split()) def l(): return list(map(int,input().split())) def lcm(a,b): return a*b//math.gcd(a,b) sys.setrecursionlimit(10 ** 6) mod = 10**9+7 cnt = 1 ans = 0 inf = float("inf") al = "abcdefghijklmnopqrstuvwxyz" AL = al.upper() n = k() s = v() s1,s2,s3 = set(),set(),set() for x in s: for z in s2: s3.add(z+x) for y in s1: s2.add(y+x) s1.add(x) print(len(s3))
[ "misc.typo", "identifier.change" ]
650,901
650,902
u750651325
python
p02844
n=int(input()) s=input() ans=0 for i in range(10): a=s.find(str(i)) if a == -1: continue for j in range(10): b=s.find(str(j),a) if b == -1: continue for k in range(10): if s.find(str(k),b) != -1: ans+=1 print(ans)
n=int(input()) s=input() ans=0 for i in range(10): a=s.find(str(i)) if a == -1: continue for j in range(10): b=s.find(str(j),a+1) if b == -1: continue for k in range(10): if s.find(str(k),b+1) != -1: ans+=1 print(ans)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
650,903
650,904
u344065503
python
p02844
N = int(input()) S = input() cnt = 0 for i in range(1000): if 0 <= i < 10: a = "00" + str(i) elif 10 <= i < 100: a = "0" + str(i) elif 100 <= i: a = str(i) idx = 0 for j in range(N): if S[i] == a[idx]: idx += 1 if idx == 3: cnt += 1 break print(cnt)
N = int(input()) S = input() cnt = 0 for i in range(1000): if 0 <= i < 10: a = "00" + str(i) elif 10 <= i < 100: a = "0" + str(i) elif 100 <= i: a = str(i) idx = 0 for j in range(N): if S[j] == a[idx]: idx += 1 if idx == 3: cnt += 1 break print(cnt)
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
650,934
650,935
u732870425
python
p02844
N = int(input()) S = input() cnt = 0 for i in range(1000): if 0 <= i < 10: a = "00" + str(i) elif 10 <= i < 100: a = "0" + str(i) elif 100 <= i: a = str(i) idx = 0 for j in range(S): if S[i] == a[idx]: idx += 1 if idx == 3: cnt += 1 break print(cnt)
N = int(input()) S = input() cnt = 0 for i in range(1000): if 0 <= i < 10: a = "00" + str(i) elif 10 <= i < 100: a = "0" + str(i) elif 100 <= i: a = str(i) idx = 0 for j in range(N): if S[j] == a[idx]: idx += 1 if idx == 3: cnt += 1 break print(cnt)
[ "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
650,936
650,935
u732870425
python
p02844
N = int(input()) S = input() cnt = 0 for i in range(1000): if 0 <= i < 10: a = "00" + str(i) elif 10 <= i < 100: a = "0" + str(i) elif 100 <= i: a = str(i) idx = 0 for j in range(S): if S[i] == a[idx]: idx += 1 if idx == 3: cnt += 1 break
N = int(input()) S = input() cnt = 0 for i in range(1000): if 0 <= i < 10: a = "00" + str(i) elif 10 <= i < 100: a = "0" + str(i) elif 100 <= i: a = str(i) idx = 0 for j in range(N): if S[j] == a[idx]: idx += 1 if idx == 3: cnt += 1 break print(cnt)
[ "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "call.add" ]
650,937
650,935
u732870425
python
p02844
N = int(input()) S = input() ans = 0 for n in range(1001): target = "{:03}".format(n) j = 0 for i in range(N): if S[i] == target[j]: j += 1 if j == 3: ans += 1 break print(ans)
N = int(input()) S = input() ans = 0 for n in range(1000): target = "{:03}".format(n) j = 0 for i in range(N): if S[i] == target[j]: j += 1 if j == 3: ans += 1 break print(ans)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
650,940
650,941
u057109575
python
p02844
N = int(input()) S = input() ans = 0 for i in range(1, 1000): num = str(i).zfill(3) flag2 = True start = 0 for j in range(3): flag = False for k in range(start, N): if(num[j] == S[k]): flag = True start = k+1 break if flag == False: flag2 = False break if flag2: ans += 1 print(ans)
N = int(input()) S = input() ans = 0 for i in range(1000): num = str(i).zfill(3) flag2 = True start = 0 for j in range(3): flag = False for k in range(start, N): if(num[j] == S[k]): flag = True start = k+1 break if flag == False: flag2 = False break if flag2: ans += 1 print(ans)
[ "call.arguments.change" ]
650,942
650,943
u995062424
python
p02844
N=int(input()) S=input() ans=0 for i in range(10): str_i = str(i) i_index==S.find(str_i) if i_index==-1: continue for j in range(10): str_j=str(j) j_index=S.find(str_j, i_index+1) if j_index==-1: continue for k in range(10): str_k=str(k) k_index=S.find(str_k, j_index+1) if k_index!=-1: ans+=1 print(ans)
N=int(input()) S=input() ans=0 for i in range(10): str_i = str(i) i_index=S.find(str_i) if i_index==-1: continue for j in range(10): str_j=str(j) j_index=S.find(str_j, i_index+1) if j_index==-1: continue for k in range(10): str_k=str(k) k_index=S.find(str_k, j_index+1) if k_index!=-1: ans+=1 print(ans)
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
650,945
650,946
u261082314
python
p02844
n=int(input()) s=input() ans,a=0,[] for i in range(n): if s[i] not in a: a+=[s[i]] b=[] for j in range(i+1,n): if s[j] not in b: b+=[s[j]] c=[] for k in range(j+1,n): if k not in c: c+=[s[k]] ans+=1 print(ans)
n=int(input()) s=input() ans,a=0,[] for i in range(n): if s[i] not in a: a+=[s[i]] b=[] for j in range(i+1,n): if s[j] not in b: b+=[s[j]] c=[] for k in range(j+1,n): if s[k] not in c: c+=[s[k]] ans+=1 print(ans)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
650,947
650,948
u941438707
python
p02844
N, S = int(input()), list(input()) S_set = set(S) ans = 0 for num in range(0, 1000): n0, n1, n2 = list(str(num).zfill(3)) if n0 in S_set and n1 in S_set and n2 in S_set: idx0 = S.idx(n0) idx2 = N - S[::-1].idx(n2) - 1 if idx0 < idx2: if n1 in S[idx0 + 1: idx2]: ans += 1 print(ans)
N = int(input()) S = list(input()) S_set = set(S) ans = 0 for num in range(0, 1000): n0, n1, n2 = list(str(num).zfill(3)) if n0 in S_set and n1 in S_set and n2 in S_set: idx0 = S.index(n0) idx2 = N - S[::-1].index(n2) - 1 if idx0 < idx2: if n1 in S[idx0 + 1: idx2]: ans += 1 print(ans)
[ "assignment.variable.change", "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
650,955
650,956
u223133214
python
p02844
n=int(input()) S=input() l=[] for i in range(26): num=str(i).zfill(3) s=S if s.find(num[0])==-1: continue s=s[s.index(num[0])+1:] if s.find(num[1])==-1: continue s=s[s.index(num[1])+1:] if s.find(num[2])==-1: continue l.append(num) print(len(set(l)))
n=int(input()) S=input() l=[] for i in range(10**3): num=str(i).zfill(3) s=S if s.find(num[0])==-1: continue s=s[s.index(num[0])+1:] if s.find(num[1])==-1: continue s=s[s.index(num[1])+1:] if s.find(num[2])==-1: continue l.append(num) print(len(set(l)))
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
650,962
650,963
u452885705
python
p02844
n = int(input()) s = input() cnt = 0 for i in range(100,1000): p = '{}'.format(i) s2 = s for j in range(3):#indexのループ if s2.find(p[j]) == -1: break s2 = s2[s2.find(p[j]) +1:] else: cnt+=1 print(cnt)
n = int(input()) s = input() cnt = 0 for i in range(1000): p = '{:03}'.format(i) s2 = s for j in range(3):#indexのループ if s2.find(p[j]) == -1: break s2 = s2[s2.find(p[j]) +1:] else: cnt+=1 print(cnt)
[ "call.arguments.change", "literal.string.change", "assignment.value.change" ]
650,977
650,978
u833738197
python
p02844
N = int(input()) S = input() S = [int(s) for s in S] res = 0 for q in product(range(10), repeat=3): i = 0 for s in S: if s==q[i]: if i==2: res += 1 break else: i+=1 print (res)
from itertools import product N = int(input()) S = input() S = [int(s) for s in S] res = 0 for q in product(range(10), repeat=3): i = 0 for s in S: if s==q[i]: if i==2: res += 1 break else: i+=1 print (res)
[]
650,984
650,985
u367701763
python
p02844
n = int(input()) s = input() pins = [] for i in range(1000): i = str(i) if len(i) == 1: pins.append(str('00')+i) elif len(i) == 2: pins.append(str('0')+i) else: pins.append(i) ans = 0 for pin in pins: c = 0 for i in s: if pin[c] == i: c += 1 if c == 3: ans += 1 break print(pins)
n = int(input()) s = input() pins = [] for i in range(1000): i = str(i) if len(i) == 1: pins.append(str('00')+i) elif len(i) == 2: pins.append(str('0')+i) else: pins.append(i) ans = 0 for pin in pins: c = 0 for i in s: if pin[c] == i: c += 1 if c == 3: ans += 1 break print(ans)
[ "identifier.change", "call.arguments.change", "io.output.change" ]
650,992
650,993
u197968862
python
p02844
n = int(input()) s = input() pins = [] for i in range(1,1000): i = str(i) if len(i) == 1: pins.append(str('00')+i) elif len(i) == 2: pins.append(str('0')+i) else: pins.append(i) ans = 0 for pin in pins: c = 0 for i in s: if pin[c] == i: c += 1 if c == 3: ans += 1 break print(ans)
n = int(input()) s = input() pins = [] for i in range(1000): i = str(i) if len(i) == 1: pins.append(str('00')+i) elif len(i) == 2: pins.append(str('0')+i) else: pins.append(i) ans = 0 for pin in pins: c = 0 for i in s: if pin[c] == i: c += 1 if c == 3: ans += 1 break print(ans)
[ "call.arguments.change" ]
650,994
650,993
u197968862
python
p02844
n=int(input()) s=list(input()) pin=set() for i in range(1,1000): yn="" stri=format(i,"03d") for ii in range(n-2): if stri[0]!=s[ii]: continue else: yn="yes1" break if yn!="yes1": yn="no" continue for iii in range(ii+1,n-1): if stri[1]!=s[iii]: continue else: yn="yes2" break if yn!="yes2": yn="no" continue for iiii in range(iii+1,n): if stri[2]!=s[iiii]: continue else: yn="yes3" break if yn=="yes3": pin.add(stri) print(len(pin))
n=int(input()) s=list(input()) pin=set() for i in range(0,1000): yn="" stri=format(i,"03d") for ii in range(n-2): if stri[0]!=s[ii]: continue else: yn="yes1" break if yn!="yes1": yn="no" continue for iii in range(ii+1,n-1): if stri[1]!=s[iii]: continue else: yn="yes2" break if yn!="yes2": yn="no" continue for iiii in range(iii+1,n): if stri[2]!=s[iiii]: continue else: yn="yes3" break if yn=="yes3": pin.add(stri) else: continue print(len(pin))
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change", "control_flow.continue.add" ]
650,995
650,996
u576432509
python
p02844
n = int(input()) s = input() ans = 0 pin = [str(i).zfill(3) for i in range(1000)] for i in pin: idx = -1 for j in i: idx = s.find(j,idx+1) if idx < 0: break else: print(j) ans += 1 print(ans)
n = int(input()) s = input() ans = 0 pin = [str(i).zfill(3) for i in range(1000)] for i in pin: idx = -1 for j in i: idx = s.find(j,idx+1) if idx < 0: break else: ans += 1 print(ans)
[ "call.remove" ]
651,001
651,002
u324197506
python
p02844
n = int(input()) s = input() print(s) cnt = 0 for s1 in range(10): s1_ind = s.find(str(s1)) if s1_ind == -1 or s1_ind >= len(s)-2 : continue for s2 in range(10): s2_ind = s[s1_ind+1: ].find(str(s2)) + s1_ind + 1 if s2_ind <= s1_ind or s2_ind >= len(s)-1: continue for s3 in range(10): s3_ind = s[s2_ind+1: ].find(str(s3)) + s2_ind + 1 if s3_ind > s2_ind: cnt+=1 print(cnt)
n = int(input()) s = input() cnt = 0 for s1 in range(10): s1_ind = s.find(str(s1)) if s1_ind == -1 or s1_ind >= len(s)-2 : continue for s2 in range(10): s2_ind = s[s1_ind+1: ].find(str(s2)) + s1_ind + 1 if s2_ind <= s1_ind or s2_ind >= len(s)-1: continue for s3 in range(10): s3_ind = s[s2_ind+1: ].find(str(s3)) + s2_ind + 1 if s3_ind > s2_ind: cnt+=1 print(cnt)
[ "call.remove" ]
651,003
651,004
u493520238
python
p02844
N = int(input()) S = list(str(input())) used = [0]*1000 for i in range(1000): stri = str(i) if len(stri) == 2: stri = "0"+stri elif len(stri) == 1: stri = "00"+stri count = 0 for j in range(N): if S[j] == stri[count]: count += 1 if count == 3: print(i) used[i] = 1 break print(sum(used))
N = int(input()) S = list(str(input())) used = [0]*1000 for i in range(1000): stri = str(i) if len(stri) == 2: stri = "0"+stri elif len(stri) == 1: stri = "00"+stri count = 0 for j in range(N): if S[j] == stri[count]: count += 1 if count == 3: used[i] = 1 break print(sum(used))
[ "call.remove" ]
651,007
651,008
u442877951
python
p02844
N = int(input()) S = list(str(input())) used = [0]*1000 for i in range(1,1000): stri = str(i) if len(stri) == 2: stri = "0"+stri elif len(stri) == 1: stri = "00"+stri count = 0 for j in range(N): if S[j] == stri[count]: count += 1 if count == 3: used[i] = 1 break print(sum(used))
N = int(input()) S = list(str(input())) used = [0]*1000 for i in range(1000): stri = str(i) if len(stri) == 2: stri = "0"+stri elif len(stri) == 1: stri = "00"+stri count = 0 for j in range(N): if S[j] == stri[count]: count += 1 if count == 3: used[i] = 1 break print(sum(used))
[ "call.arguments.change" ]
651,009
651,008
u442877951
python
p02844
n = int(input()) s = str(input()) import re s = re.sub('[0]{4,}','000',s) s = re.sub('[1]{4,}','111',s) s = re.sub('[2]{4,}','222',s) s = re.sub('[3]{4,}','333',s) s = re.sub('[4]{4,}','444',s) s = re.sub('[5]{4,}','555',s) s = re.sub('[6]{4,}','666',s) s = re.sub('[7]{4,}','777',s) s = re.sub('[8]{4,}','888',s) s = re.sub('[9]{4,}','999',s) ans = 0 target = [0] * 10 for i in s: target[int(i)] = 1 for xxx in range(1000): x = str(xxx).zfill(3) if(not (target[int(x[0])] and target[int(x[1])] and target[int(x[2])])): continue ck1,ck2,ck3 = 0,0,0 start = 0 for i in range(start,n): if(s[i] == x[0]): ck1 = 1 start = i+1 break if(ck1): for i in range(start,n): if(s[i] == x[1]): ck2 = 1 start = i+1 break if(ck1 and ck2): for i in range(start,n): if(s[i] == x[2]): ans += 1 break print(ans)
n = int(input()) s = str(input()) #n = 10000 #s = '8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888818888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888388888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888828888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888885888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888898888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888388888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888488888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888788888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888898888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888788888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888868888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888688888888888888888888888888888888888888888888888808888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888' import re s = re.sub('[0]{4,}','000',s) s = re.sub('[1]{4,}','111',s) s = re.sub('[2]{4,}','222',s) s = re.sub('[3]{4,}','333',s) s = re.sub('[4]{4,}','444',s) s = re.sub('[5]{4,}','555',s) s = re.sub('[6]{4,}','666',s) s = re.sub('[7]{4,}','777',s) s = re.sub('[8]{4,}','888',s) s = re.sub('[9]{4,}','999',s) n = len(s) ans = 0 target = [0] * 10 for i in s: target[int(i)] = 1 for xxx in range(1000): x = str(xxx).zfill(3) if(not (target[int(x[0])] and target[int(x[1])] and target[int(x[2])])): continue ck1,ck2,ck3 = 0,0,0 start = 0 for i in range(start,n): if(s[i] == x[0]): ck1 = 1 start = i+1 break if(ck1): for i in range(start,n): if(s[i] == x[1]): ck2 = 1 start = i+1 break if(ck1 and ck2): for i in range(start,n): if(s[i] == x[2]): ans += 1 break print(ans)
[ "assignment.add" ]
651,010
651,011
u014268998
python
p02844
n = int(input()) s = input() lst = [0] * 1000 for i in range(1000): if len(str(i)) == 1: tmp = '00' + str(i) lst[i] = tmp elif len(str(i)) == 2: tmp = '0' + str(i) lst[i] = tmp else: lst[i] = str(i) cnt = 0 for v in lst: id_1 = s.find(v[0]) if id_1 == -1: continue id_2 = s.find(v[1], id_1 + 1) if id_2 == -1: continue id_3 = s.find(v[2], id_2 + 1) if id_3 == -1: continue cnt += 1
n = int(input()) s = input() lst = [0] * 1000 for i in range(1000): if len(str(i)) == 1: tmp = '00' + str(i) lst[i] = tmp elif len(str(i)) == 2: tmp = '0' + str(i) lst[i] = tmp else: lst[i] = str(i) cnt = 0 for v in lst: id_1 = s.find(v[0]) if id_1 == -1: continue id_2 = s.find(v[1], id_1 + 1) if id_2 == -1: continue id_3 = s.find(v[2], id_2 + 1) if id_3 == -1: continue cnt += 1 print(cnt)
[ "call.add" ]
651,023
651,024
u729535891
python
p02844
a = int(input()) b = input() def my_count(l): p = 0 for i in range(10): i = str(i) if i in l: p = p + 1 return p s = [] ans = 0 for i in range(10): k = str(i) s.append(b.find(k)) if s[i] >= 0: for j in range(10): h = str(j) y = b[s[i]+1:len(b)] t = y.find(h) if t >= 0: c = y[t+1:len(b)] ans = ans + my_count(c) print(s) print(ans)
a = int(input()) b = input() def my_count(l): p = 0 for i in range(10): i = str(i) if i in l: p = p + 1 return p s = [] ans = 0 for i in range(10): k = str(i) s.append(b.find(k)) if s[i] >= 0: for j in range(10): h = str(j) y = b[s[i]+1:len(b)] t = y.find(h) if t >= 0: c = y[t+1:len(b)] ans = ans + my_count(c) print(ans)
[ "call.remove" ]
651,043
651,044
u660245210
python
p02844
n = int(input()) s = list(input()) ss = s[::-1] ans = 0 for i in range(1,1000): if i < 100: a = 0 else: a = i // 100 if i < 10: b = 0 else: b = (i-a*100)//10 c = i-(a*100+b*10) if str(a) in s and str(c) in s: k = s.index(str(a)) l = n-1-ss.index(str(c)) for j in range(k+1,l): if s[j] == str(b): ans += 1 break print(ans)
n = int(input()) s = list(input()) ss = s[::-1] ans = 0 for i in range(1000): if i < 100: a = 0 else: a = i // 100 if i < 10: b = 0 else: b = (i-a*100)//10 c = i-(a*100+b*10) if str(a) in s and str(c) in s: k = s.index(str(a)) l = n-1-ss.index(str(c)) for j in range(k+1,l): if s[j] == str(b): ans += 1 break print(ans)
[ "call.arguments.change" ]
651,049
651,050
u906428167
python
p02844
N = int(input()) S = input() count = 0 for i in range(1000): j = i + 1 if(j<10): first = S.find('0') if(first >= 0 and first < N): second = S[first+1:].find('0') if(second >= 0 and first+second+1 < N): third = S[first+second+2:].find(str(j)) if(third>=0): count += 1 elif(j<100): first = S.find('0') if(first >= 0 and first < N): second = S[first+1:].find(str((j%100)//10)) if(second >= 0 and first+second+1 < N): third = S[first+second+2:].find(str(j%10)) if(third>=0): count += 1 else: first = S.find(str(j//100)) if(first >= 0 and first < N): second = S[first+1:].find(str((j%100)//10)) if(second >= 0 and first+second+1 < N): third = S[first+second+2:].find(str(j%10)) if(third>=0 ): count += 1 print(count)
N = int(input()) S = input() count = 0 for i in range(1000): j = i if(j<10): first = S.find('0') if(first >= 0 and first < N): second = S[first+1:].find('0') if(second >= 0 and first+second+2 < N): third = S[first+second+2:].find(str(j)) if(third>=0): count += 1 elif(j<100): first = S.find('0') if(first >= 0 and first < N): second = S[first+1:].find(str((j%100)//10)) if(second >= 0 and first+second+2 < N): third = S[first+second+2:].find(str(j%10)) if(third>=0): count += 1 else: first = S.find(str(j//100)) if(first >= 0 and first < N): second = S[first+1:].find(str((j%100)//10)) if(second >= 0 and first+second+2 < N): third = S[first+second+2:].find(str(j%10)) if(third>=0 ): count += 1 print(count)
[ "expression.operation.binary.remove", "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
651,053
651,054
u340153434
python
p02844
def f(): n = int(input()) s = input() leftMemo = [None]*10 rightMemo = [None]*10 for i in range(10): char = str(i) for j in range(n): if s[j] == char: leftMemo[i] = j break for k in range(n-1,-1,-1): if s[k] == char: rightMemo[i] = k break ans = 0 for leftNum in range(10): if leftMemo[leftNum] is None: continue start = leftMemo[leftNum]+1 for rightNum in range(10): if rightMemo[rightNum] is None: continue end = rightMemo[rightNum] ans += len(set(s[start:end])) print(ans)
def f(): n = int(input()) s = input() leftMemo = [None]*10 rightMemo = [None]*10 for i in range(10): char = str(i) for j in range(n): if s[j] == char: leftMemo[i] = j break for k in range(n-1,-1,-1): if s[k] == char: rightMemo[i] = k break ans = 0 for leftNum in range(10): if leftMemo[leftNum] is None: continue start = leftMemo[leftNum]+1 for rightNum in range(10): if rightMemo[rightNum] is None: continue end = rightMemo[rightNum] ans += len(set(s[start:end])) print(ans) f()
[ "call.add" ]
651,059
651,060
u714439871
python
p02844
N = int(input()) S = input() kouho = [str(i).zfill(3) for i in range(0,100)] cnt =0 for k in kouho: ok = True S_temp = S for l in k: if l in S_temp: basho = S_temp.index(l) S_temp = S_temp[basho+1:] else: ok = False break if ok == True: cnt += 1 print(cnt)
N = int(input()) S = input() kouho = [str(i).zfill(3) for i in range(0,1000)] cnt =0 for k in kouho: ok = True S_temp = S for l in k: if l in S_temp: basho = S_temp.index(l) S_temp = S_temp[basho+1:] else: ok = False break if ok == True: cnt += 1 print(cnt)
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
651,073
651,074
u255943004
python
p02844
N = int(input()) S = input() kouho = [str(i).zfill(3) for i in range(1,1001)] cnt =0 for k in kouho: ok = True S_temp = S for l in k: if l in S_temp: basho = S_temp.index(l) S_temp = S_temp[basho+1:] else: ok = False break if ok == True: cnt += 1 print(cnt)
N = int(input()) S = input() kouho = [str(i).zfill(3) for i in range(0,1000)] cnt =0 for k in kouho: ok = True S_temp = S for l in k: if l in S_temp: basho = S_temp.index(l) S_temp = S_temp[basho+1:] else: ok = False break if ok == True: cnt += 1 print(cnt)
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change", "control_flow.loop.range.bounds.upper.change" ]
651,075
651,074
u255943004
python
p02844
N = int(input()) S = input() count = 0 for i in range(9): for j in range(9): for k in range(9): pas = [str(i),str(j),str(k)] key = 0 for c in S: if c == pas[key]: key += 1 if key ==3: count +=1 break print(count)
N = int(input()) S = input() count = 0 for i in range(10): for j in range(10): for k in range(10): pas = (str(i),str(j),str(k)) key = 0 for c in S: if c == pas[key]: key += 1 if key ==3: count +=1 break print(count)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "assignment.value.change" ]
651,076
651,077
u103902792
python
p02844
from bisect import bisect_right n = int(input()) s = input() ans = 0 pos = [ [] for _ in range(10) ] def find_gt(a, x): 'Find leftmost value greater than x' i = bisect_right(a, x) if i != len(a): return a[i] return None for j in range(n): pos[int(s[j])].append(j) for i in range(1001): t = '000' + str(i) t = t[-3:] a, b, c = map(int, tuple(t)) p = -1 p = find_gt(pos[a], p) if p is None: continue q = find_gt(pos[b], p) if q is None: continue r = find_gt(pos[c], q) if r is None: continue ans += 1 print(ans)
from bisect import bisect_right n = int(input()) s = input() ans = 0 pos = [ [] for _ in range(10) ] def find_gt(a, x): 'Find leftmost value greater than x' i = bisect_right(a, x) if i != len(a): return a[i] return None for j in range(n): pos[int(s[j])].append(j) for i in range(1000): t = '000' + str(i) t = t[-3:] a, b, c = map(int, tuple(t)) p = -1 p = find_gt(pos[a], p) if p is None: continue q = find_gt(pos[b], p) if q is None: continue r = find_gt(pos[c], q) if r is None: continue ans += 1 print(ans)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
651,078
651,079
u598755311
python
p02844
length = int(input()) string = input() possible_pins = list() for pin in [str(num) for num in range(1, 1000)]: if len(pin) == 1: pin = "00" + pin elif len(pin) == 2: pin = "0" + pin possible_pins.append(pin) count = 0 for pin in possible_pins: start = 0 for letter in pin: try: index = string.index(letter, start) start = index + 1 except ValueError: break else: count += 1 print(count)
length = int(input()) string = input() possible_pins = list() for pin in [str(num) for num in range(0, 1000)]: if len(pin) == 1: pin = "00" + pin elif len(pin) == 2: pin = "0" + pin possible_pins.append(pin) count = 0 for pin in possible_pins: start = 0 for letter in pin: try: index = string.index(letter, start) start = index + 1 except ValueError: break else: count += 1 print(count)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
651,090
651,091
u721569287
python
p02844
n = int(input()) s = input() index = 0 cnt = 0 for i in range(0, 1000): if i < 10: value = '00' + str(i) elif i < 100: value = '0' + str(i) else: value = str(i) print(value) for j in s: if value[index] == j: index += 1 if index == 3: cnt += 1 index = 0 break index = 0 print(cnt)
n = int(input()) s = input() index = 0 cnt = 0 for i in range(0, 1000): if i < 10: value = '00' + str(i) elif i < 100: value = '0' + str(i) else: value = str(i) for j in s: if value[index] == j: index += 1 if index == 3: cnt += 1 index = 0 break index = 0 print(cnt)
[ "call.remove" ]
651,104
651,105
u118211443
python
p02844
n = int(input()) s = input() index = 0 cnt = 0 for i in range(1, 1000): if i < 10: value = '00' + str(i) elif i < 100: value = '0' + str(i) else: value = str(i) for j in s: if value[index] == j: index += 1 if index == 3: cnt += 1 index = 0 break index = 0 print(cnt)
n = int(input()) s = input() index = 0 cnt = 0 for i in range(0, 1000): if i < 10: value = '00' + str(i) elif i < 100: value = '0' + str(i) else: value = str(i) for j in s: if value[index] == j: index += 1 if index == 3: cnt += 1 index = 0 break index = 0 print(cnt)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.lower.change" ]
651,106
651,105
u118211443
python
p02844
import sys def input(): return sys.stdin.readline()[:-1] inf=float("inf") n=int(input()) s=input() li=[[-1]*10 for i in range(n+1)] for i in range(n): li[-i-2]=li[-i-1][:] li[-i-2][int(s[-i-1])]=n-1-i print(li) ans=0 for i in range(1000): tmp=str(i) while len(tmp)!=3: tmp= "0"+tmp now=0 for j in range(3): if li[now][int(tmp[j])]==-1: break now=li[now][int(tmp[j])]+1 if j==2: ans+=1 print(ans)
import sys def input(): return sys.stdin.readline()[:-1] inf=float("inf") n=int(input()) s=input() li=[[-1]*10 for i in range(n+1)] for i in range(n): li[-i-2]=li[-i-1][:] li[-i-2][int(s[-i-1])]=n-1-i ans=0 for i in range(1000): tmp=str(i) while len(tmp)!=3: tmp= "0"+tmp now=0 for j in range(3): if li[now][int(tmp[j])]==-1: break now=li[now][int(tmp[j])]+1 if j==2: ans+=1 print(ans)
[ "call.remove" ]
651,116
651,117
u654470292
python
p02844
n,s = [input() for i in range(2)] c = 0 for i in range(1000): if i < 10: a1 = '0' a2 = '0' a3 = i elif i < 100: a1 = '0' a2 = str(i)[0] a3 = str(i)[1] else: a1 = str(i)[0] a2 = str(i)[1] a3 = str(i)[2] p1 = s.find(a1) if p1 >= 0: p2 = s.find(a2, p1 + 1) if p2 >= 0: if s.find(a3, p2 + 1) >= 0: c += 1 print(c)
n,s = [input() for i in range(2)] c = 0 for i in range(1000): if i < 10: a1 = '0' a2 = '0' a3 = str(i) elif i < 100: a1 = '0' a2 = str(i)[0] a3 = str(i)[1] else: a1 = str(i)[0] a2 = str(i)[1] a3 = str(i)[2] p1 = s.find(a1) if p1 >= 0: p2 = s.find(a2, p1 + 1) if p2 >= 0: if s.find(a3, p2 + 1) >= 0: c += 1 print(c)
[ "call.add", "call.arguments.change" ]
651,118
651,119
u250583425
python