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 |
|---|---|---|---|---|---|---|---|
p02394
|
w, h, x, y, r = gets.split.map(&:to_i)
if x < r || w < x + r || y < r || y + r < h
puts "No"
else
puts "Yes"
end
|
w, h, x, y, r = gets.split.map(&:to_i)
if x < r || w < x + r || y < r || h < y + r
puts "No"
else
puts "Yes"
end
|
[
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 170,595
| 170,593
|
u209022771
|
ruby
|
p02394
|
w, h, x, y, r = gets.split.map &:to_i
puts x.between?(r, w-r) && y.between?(r, y-r) ? :Yes : :No
|
w, h, x, y, r = gets.split.map &:to_i
puts x.between?(r, w-r) && y.between?(r, h-r) ? :Yes : :No
|
[
"identifier.change",
"control_flow.branch.if.condition.change"
] | 170,605
| 170,606
|
u833420492
|
ruby
|
p02394
|
W,H,x,y,r = gets.split.map(&:to_i)
if 0<=x-r && 0<=y-r && x+r<=W && y+r<=H then
puts Yes
else
puts No
end
|
W, H, x, y, r = gets.split.map(&:to_i)
if 0<=x-r && 0<=y-r && x+r<=W && y+r<=H then
puts "Yes"
else
puts "No"
end
|
[
"call.arguments.change"
] | 170,611
| 170,610
|
u043406421
|
ruby
|
p02394
|
w,h,x,y,r = gets.split(" ").map(&:to_i)
b = [x-r, y-r, w-x-r, h-y-r]
sum = 0
4.times do |i|
sum = b[i].abs - b[i]
end
r = ["No", "Yes"]
puts r[sum ** -sum]
|
w,h,x,y,r = gets.split(" ").map(&:to_i)
b = [x-r, y-r, w-x-r, h-y-r]
sum = 0
4.times do |i|
sum += b[i].abs - b[i]
end
r = ["No", "Yes"]
puts r[sum ** -sum]
|
[
"assignment.value.change"
] | 170,612
| 170,613
|
u708862509
|
ruby
|
p02394
|
W,H,x,y,r = gets.chomp.split.map(&:to_i)
if (x-r>0) && (x+r<W) then
if (y-r>0) && (y+r<H) then
puts "Yes"
exit
end
end
puts "No"
|
W,H,x,y,r = gets.chomp.split.map(&:to_i)
if (x-r>=0) && (x+r<=W) then
if (y-r>=0) && (y+r<=H) then
puts "Yes"
exit
end
end
puts "No"
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,614
| 170,615
|
u741415050
|
ruby
|
p02394
|
w,h,x,y,r = gets.split.map(&:to_i)
if r<=x<=w - r&&r<=y<= h - r
puts "Yes"
else
puts "No"
end
|
w,h,x,y,r = gets.split.map(&:to_i)
if r<=x&&x<=w - r&&r<=y&& y<= h - r
puts "Yes"
else
puts "No"
end
|
[
"control_flow.branch.if.condition.change"
] | 170,617
| 170,618
|
u518934248
|
ruby
|
p02394
|
info = [0.0]
a= gets
info = a.split()
W = info[0].to_i
H = info[1].to_i
x = info[2].to_i
y = info[3].to_i
r = info[4].to_i
if (x-r)>0 && (y-r)>0 && (x+r)<W && (y+r)<H then
print "Yes\n"
else
print "No\n"
end
|
info = [0.0]
a= gets
info = a.split()
W = info[0].to_i
H = info[1].to_i
x = info[2].to_i
y = info[3].to_i
r = info[4].to_i
if (x-r) >=0 && (y-r) >=0 && (x+r) <= W && (y+r) <= H then
print "Yes\n"
else
print "No\n"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,623
| 170,624
|
u725960328
|
ruby
|
p02394
|
is = gets.chomp!.split(" ")
is.map!(&:to_i)
w = is[0]
h = is[1]
x = is[2]
y = is[3]
r = is[4]
if ((x+r) > w)||((x-r) < 0)||((y+r) > h)||((y-r)<0) then
puts "Yes"
else
puts "No"
end
|
is = gets.chomp!.split(" ")
is.map!(&:to_i)
w = is[0]
h = is[1]
x = is[2]
y = is[3]
r = is[4]
if ((x+r) > w)||((x-r) < 0)||((y+r) > h)||((y-r)<0) then
puts "No"
else
puts "Yes"
end
|
[
"call.remove",
"call.add"
] | 170,626
| 170,627
|
u944058699
|
ruby
|
p02394
|
W,H,x,y,r = gets.split
if (x.to_i - r.to_i) > 0 && (x.to_i + r.to_i) < W.to_i
if(y.to_i - r.to_i) > 0 && (y.to_i + r.to_i) < H.to_i
puts "Yes"
else puts "No"
end
else puts "No"
end
|
W,H,x,y,r = gets.split
if (x.to_i - r.to_i) >= 0 && (x.to_i + r.to_i) <= W.to_i
if(y.to_i - r.to_i) >= 0 && (y.to_i + r.to_i) <= H.to_i
puts "Yes"
else puts "No"
end
else puts "No"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,640
| 170,641
|
u891643702
|
ruby
|
p02394
|
a = gets.split(" ").map{|x| x.to_i}
W=a[0]
H=a[1]
x=a[2]
y=a[3]
r=a[4]
if r < x and r < y and x+r < W and y+r < H
print "Yes\n"
else
print "No\n"
end
|
a = gets.split(" ").map{|x| x.to_i}
W=a[0]
H=a[1]
x=a[2]
y=a[3]
r=a[4]
if r <= x and r <= y and x+r <= W and y+r <= H
print "Yes\n"
else
print "No\n"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,642
| 170,643
|
u147878192
|
ruby
|
p02394
|
w,h,x,y,r = gets.split(' ').collect{|n|n.to_i}
if (x+r < w) && (y+r < h) && (x-r > 0) && (y-r > 0)
puts("Yes")
else
puts("No")
end
|
w,h,x,y,r = gets.split(' ').collect{|n|n.to_i}
if (x+r <= w) && (y+r <= h) && (x-r >= 0) && (y-r >= 0)
puts("Yes")
else
puts("No")
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,647
| 170,648
|
u861698758
|
ruby
|
p02394
|
W, H, X, Y, R = gets.split.map &:to_i
C = R < X && X+R < W && R < Y && Y+R < H
puts C ? :Yes : :No
|
W, H, X, Y, R = gets.split.map &:to_i
C = R <= X && X+R <= W && R <= Y && Y+R <= H
puts C ? :Yes : :No
|
[
"expression.operator.compare.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 170,651
| 170,652
|
u556326323
|
ruby
|
p02394
|
w,h,x,y,r=gets.split.map &:to_i
puts [x,y,w-x,h-y].min>r ?"Yes":"No"
|
w,h,x,y,r=gets.split.map &:to_i
puts [x,y,w-x,h-y].min<r ?"No":"Yes"
|
[
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.string.change",
"call.arguments.change"
] | 170,653
| 170,654
|
u823513038
|
ruby
|
p02394
|
w, h, x, y, r = gets.chomp.split(" ").map(&:to_i)
flag_x = 0 + r < x && w - r > x
flag_y = 0 + r < y && h - r > y
if flag_x == true && flag_y == true
puts "Yes"
else
puts "No"
end
|
w, h, x, y, r = gets.chomp.split(" ").map(&:to_i)
flag_x = 0 + r <= x && w - r >= x
flag_y = 0 + r <= y && h - r >= y
if flag_x == true && flag_y == true
puts "Yes"
else
puts "No"
end
|
[
"expression.operator.compare.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 170,657
| 170,658
|
u141917820
|
ruby
|
p02394
|
w,h,x,y,r = gets.chomp.spliy(" ").map &:to_i
if 0 <= x-r and x+r <= w and 0 <= y-r and y+r <= h
puts "Yes"
else
puts "No"
end
|
w,h,x,y,r = gets.chomp.split(" ").map &:to_i
if 0 <= x-r and x+r <= w and 0 <= y-r and y+r <= h
puts "Yes"
else
puts "No"
end
|
[
"assignment.value.change",
"identifier.change"
] | 170,659
| 170,660
|
u281257618
|
ruby
|
p02394
|
arr = gets.to_s.split(" ")
w = arr[0].to_i
h = arr[1].to_i
x = arr[2].to_i
y = arr[3].to_i
r = arr[4].to_i
if x > r && y > r && x < w - r && y < h - r then
puts "Yes"
else
puts "No"
end
|
arr = gets.to_s.split(" ")
w = arr[0].to_i
h = arr[1].to_i
x = arr[2].to_i
y = arr[3].to_i
r = arr[4].to_i
if x >= r && y >= r && x <= w - r && y <= h - r then
puts "Yes"
else
puts "No"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,664
| 170,665
|
u103323128
|
ruby
|
p02394
|
w,h,x,y,r = gets.chomp.split.map{|x| x.to_i}
if x.between?(r,w-r)&&y.between(r,h-r)
puts "Yes"
else
puts "No"
end
|
w,h,x,y,r = gets.chomp.split.map{|x| x.to_i}
if x.between?(r, w-r) && y.between?(r, h-r)
puts "Yes"
else
puts"No"
end
|
[
"identifier.change",
"control_flow.branch.if.condition.change"
] | 170,676
| 170,677
|
u456179450
|
ruby
|
p02394
|
W,H,x,y,r = gets.split.map(&:to_i)
puts (x-r < 0 || x+r > W || y-r < 0 || y+r > H) ? "NO" : "YES"
|
W,H,x,y,r = gets.split.map(&:to_i)
puts (x-r < 0 || x+r > W || y-r < 0 || y+r > H) ? "No" : "Yes"
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 170,680
| 170,681
|
u662700808
|
ruby
|
p02394
|
W,H,x,y,r = gets.split.map{ |x| x.to_i }
if (x + r) < W && (x - r) > 0 && (y + r) < W && (y - r) > 0
puts "Yes"
else
puts "No"
end
|
W,H,x,y,r = gets.split.map{ |x| x.to_i }
if (x + r) <= W && (x - r) >= 0 && (y + r) <= H && (y - r) >= 0
puts "Yes"
else
puts "No"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,686
| 170,687
|
u757861951
|
ruby
|
p02394
|
W,H,x,y,r = gets.split.map{ |x| x.to_i }
if (x + r) < W && (x - r) > 0 && (y + r) < H && (y - r) > 0
puts "Yes"
else
puts "No"
end
|
W,H,x,y,r = gets.split.map{ |x| x.to_i }
if (x + r) <= W && (x - r) >= 0 && (y + r) <= H && (y - r) >= 0
puts "Yes"
else
puts "No"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,688
| 170,687
|
u757861951
|
ruby
|
p02394
|
def incriment(w, h, x, y, r)
maxw = w - r
maxh = h - r
if (maxw >= x && r < x && maxh >= y && r < y)
return 'Yes'
else
return 'No'
end
end
input = gets.chomp
w, h, x, y, r = input.split(' ').map(&:to_i)
puts incriment(w, h, x, y, r)
|
def incriment(w, h, x, y, r)
maxw = w - r
maxh = h - r
if (maxw >= x && r <= x && maxh >= y && r <= y)
return 'Yes'
else
return 'No'
end
end
input = gets.chomp
w, h, x, y, r = input.split(' ').map(&:to_i)
puts incriment(w, h, x, y, r)
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,689
| 170,690
|
u791170614
|
ruby
|
p02394
|
begin
input_line = []
while line = $stdin.gets.chomp
break if line == ""
input_line.push(line.split(" "))
end
rescue
end
input_line = input_line.first.map{|i| i.to_i }
if (input_line[2] < 0) || (input_line[3] < 0)
puts "No"
elsif (((input_line[2] + input_line[4]) < input_line[0]) && ((input_line[3] + input_line[4]) < input_line[1])
) && ((input_line[2] - input_line[4]) > 0) && ((input_line[3] - input_line[4]) > 0)
puts "Yes"
else
puts "No"
end
|
begin
input_line = []
while line = $stdin.gets.chomp
break if line == ""
input_line.push(line.split(" "))
end
rescue
end
input_line = input_line.first.map{|i| i.to_i }
if (input_line[2] < 0) || (input_line[3] < 0)
puts "No"
elsif (((input_line[2] + input_line[4]) <= input_line[0]) && ((input_line[3] + input_line[4]) <= input_line[1])
) && ((input_line[2] - input_line[4]) >= 0) && ((input_line[3] - input_line[4]) >= 0)
puts "Yes"
else
puts "No"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,697
| 170,698
|
u626163867
|
ruby
|
p02394
|
# Here your code !
w,h,x,y,r = gets.split(' ').map(&:to_i)
puts (r <= x && x < w-r) && (r <= y && y < h-r) ? "Yes" : "No"
|
# Here your code !
w,h,x,y,r = gets.split(' ').map(&:to_i)
puts (r <= x && x <= w-r) && (r <= y && y <= h-r) ? "Yes" : "No"
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,699
| 170,700
|
u624893585
|
ruby
|
p02394
|
w,h,x,y,r = gets.split.map!(&:to_i)
w_max_limit = w - r
w_min_limit = r
h_max_limit = h - r
h_min_limit = r
if x < w_min_limit || x > w_max_limit || y <h_min_limit || y > h_max_limit then
puts "Yes"
else
puts "No"
end
|
w,h,x,y,r = gets.split.map!(&:to_i)
w_max_limit = w - r
w_min_limit = r
h_max_limit = h - r
h_min_limit = r
if x < w_min_limit || x > w_max_limit || y <h_min_limit || y > h_max_limit then
puts "No"
else
puts "Yes"
end
|
[
"call.remove",
"call.add"
] | 170,701
| 170,702
|
u166301467
|
ruby
|
p02394
|
tmp = gets.chomp.split.map(&:to_i)
w = tmp[0]
h = tmp[1]
x = tmp[2]
y = tmp[3]
r = tmp[4]
if w>x+r && h>y+r && 0<y-r && 0<x-r
puts "Yes"
else
puts "No"
end
|
tmp = gets.chomp.split.map(&:to_i)
w = tmp[0]
h = tmp[1]
x = tmp[2]
y = tmp[3]
r = tmp[4]
if w>=x+r && h>=y+r && 0<=y-r && 0<=x-r
puts "Yes"
else
puts "No"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,703
| 170,704
|
u723368439
|
ruby
|
p02394
|
w,h,x,y,r =gets.chomp.split(' ').map{|x|x.to_i}
if r<x&&x<(w-r)&&r<y&&y<(h-r)
puts "Yes"
else
puts "No"
end
|
w,h,x,y,r =gets.chomp.split(' ').map{|x|x.to_i}
if r<=x&&x<=(w-r)&&r<=y&&y<=(h-r)
puts "Yes"
else
puts "No"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,705
| 170,706
|
u534464795
|
ruby
|
p02394
|
w,h,x,y,r=gets.split.map &:to_i
puts x-r<0||x+r>w||y-r<0||y+r>h ? 'Yes' : 'No'
|
w,h,x,y,r=gets.split.map &:to_i
puts (x-r<0||x+r>w||y-r<0||y+r>h) ? 'No' : 'Yes'
|
[
"control_flow.branch.if.condition.change"
] | 170,707
| 170,708
|
u279605379
|
ruby
|
p02394
|
w,h,x,y,r=gets.split.map &:to_i
puts (x-r<0||x+r>w||y-r<0||y+r>h) ? 'Yes' : 'No'
|
w,h,x,y,r=gets.split.map &:to_i
puts (x-r<0||x+r>w||y-r<0||y+r>h) ? 'No' : 'Yes'
|
[
"literal.string.change",
"call.arguments.change"
] | 170,709
| 170,708
|
u279605379
|
ruby
|
p02394
|
w,h,x,y,r=gets.split.map &:to_i
puts x-r<0||x+r>w||y-r<0||y+r>h ? 'Yes' : 'No'
|
w,h,x,y,r=gets.split.map &:to_i
puts x-r<0||x+r>w||y-r<0||y+r>h ? 'No' : 'Yes'
|
[
"literal.string.change",
"call.arguments.change"
] | 170,707
| 170,710
|
u279605379
|
ruby
|
p02394
|
w,h,x,y,r=gets.split.map &:to_i
puts (x-r<0||x+r>w||y-r<0||y+r>h) ? 'Yes' : 'No'
|
w,h,x,y,r=gets.split.map &:to_i
puts x-r<0||x+r>w||y-r<0||y+r>h ? 'No' : 'Yes'
|
[
"control_flow.branch.if.condition.change"
] | 170,709
| 170,710
|
u279605379
|
ruby
|
p02394
|
w,h,x,y,r=gets.split.map &:to_i
puts x-r<0||x+r>w||y-r<0||y+r>h ? :Yes : :No
|
w,h,x,y,r=gets.split.map &:to_i
puts x-r<0||x+r>w||y-r<0||y+r>h ?:No : :Yes
|
[] | 170,711
| 170,712
|
u279605379
|
ruby
|
p02394
|
w,h,x,y,r=gets.split.map &:to_i
puts x-r<0||x+r>w||y-r<0||y+r>h ? :Yes : :No
|
w,h,x,y,r=gets.split.map &:to_i
puts x-r<0||x+r>w||y-r<0||y+r>h ?:No: :Yes
|
[] | 170,711
| 170,713
|
u279605379
|
ruby
|
p02394
|
w,h,x,y,r=gets.split.map &:to_i
puts [x,w-x,y,h-y].min<r ?:NO: :Yes
|
w,h,x,y,r=gets.split.map &:to_i
puts [x,w-x,y,h-y].min<r ?:No: :Yes
|
[
"call.arguments.change"
] | 170,717
| 170,718
|
u279605379
|
ruby
|
p02394
|
w,h,x,y,r=gets.split.map &:to_i
puts [x,w-x,y,h-y].min<r ? :NO: :Yes
|
w,h,x,y,r=gets.split.map &:to_i
puts [x,w-x,y,h-y].min<r ?:No: :Yes
|
[
"call.arguments.change"
] | 170,719
| 170,718
|
u279605379
|
ruby
|
p02394
|
w,h,x,y,r=gets.split.map &:to_i
puts r>[x,w-x,y,h-y].min ? :NO: :Yes
|
w,h,x,y,r=gets.split.map &:to_i
puts [x,w-x,y,h-y].min<r ?:No: :Yes
|
[
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change",
"call.arguments.change"
] | 170,720
| 170,718
|
u279605379
|
ruby
|
p02394
|
w, h, x, y, r = gets.chomp.split.map(&:to_i)
if x + r < w && x - r > 0 && y + r < h && y - r > 0
puts "Yes"
else
puts "No"
end
|
w, h, x, y, r = gets.chomp.split.map(&:to_i)
if x + r <= w && x - r >= 0 && y + r <= h && y - r >= 0
puts "Yes"
else
puts "No"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,721
| 170,722
|
u802537549
|
ruby
|
p02394
|
w,h,x,y,r = gets.chomp.split(" ").map(&:to_i)
if (r <= x && x <= w - r) || (r <= y || y <= h - r)
puts "Yes"
else
puts "No"
end
|
w,h,x,y,r = gets.chomp.split(" ").map(&:to_i)
if r <= x && x <= w - r && r <= y && y <= h - r
puts "Yes"
else
puts "No"
end
|
[
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove",
"misc.opposites"
] | 170,724
| 170,725
|
u656368260
|
ruby
|
p02394
|
str=gets.chomp
num=str.split
W=num[0].to_i
H=num[1].to_i
x=num[2].to_i
y=num[3].to_i
r=num[4].to_i
if x-r>=0 && y-r>=0 && x+r<W && y+r<H then
puts "Yes"
else
puts "No"
end
|
str=gets.chomp
num=str.split
W=num[0].to_i
H=num[1].to_i
x=num[2].to_i
y=num[3].to_i
r=num[4].to_i
if x-r>=0 && y-r>=0 && x+r<=W && y+r<=H then
puts "Yes"
else
puts "No"
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 170,731
| 170,732
|
u284204984
|
ruby
|
p02394
|
W,H,x,y,r = gets.split(" ").map(&:to_i)
answer =
if r <= x && x <= W - x && r <= y && y <= H - r then
"Yes"
else
"No"
end
puts answer
|
W,H,x,y,r = gets.split(" ").map(&:to_i)
answer =
if r <= x && x <= W - r && r <= y && y <= H - r then
"Yes"
else
"No"
end
puts answer
|
[
"assignment.value.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 170,734
| 170,735
|
u048060093
|
ruby
|
p02393
|
a = gets.split(" ").map(&:to_i).sort
puts i.join(" ")
|
a = gets.split(" ").map(&:to_i).sort
puts a.join(" ")
|
[
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 171,038
| 171,039
|
u407138207
|
ruby
|
p02393
|
a = gets.split(" ").map(&:to_i).sort
puts i.join(" ")
|
a = gets.split(" ").map(&:to_i).sort
puts a.join(" ")
|
[
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 171,038
| 171,040
|
u407138207
|
ruby
|
p02393
|
puts gets.split.map &:to_i.sort*" "
|
puts gets.split.map(&:to_i).sort*" "
|
[
"call.arguments.change"
] | 171,050
| 171,051
|
u279605379
|
ruby
|
p02393
|
puts get.split(' ').map(&:to_i).sort.join(' ')
|
puts gets.split(' ').map(&:to_i).sort.join(' ')
|
[
"identifier.change",
"call.arguments.change"
] | 171,052
| 171,053
|
u827318431
|
ruby
|
p02393
|
inputs = gets.strip.split(' ')
inputs.map!{|i| i.to_i}
p inputs.sort.join(" ")
|
inputs = gets.strip.split(' ')
inputs.map!{|i| i.to_i}
puts inputs.sort.join(" ")
|
[
"call.function.change",
"io.output.change"
] | 171,058
| 171,059
|
u839879644
|
ruby
|
p02396
|
i = 0
while x = gets
if x.to_i == 0; break
end
i += 1
puts "case" + " " + i.to_s + ":" + " " + x.to_s
end
|
i = 0
while x = gets
if x.to_i == 0; break
end
i += 1
puts "Case" + " " + i.to_s + ":" + " " + x.to_s
end
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 174,882
| 174,883
|
u587994751
|
ruby
|
p02396
|
class Main
index = 1
while(true)
x = gets.to_i
break if x == 0
puts "Case #{index}: #{x}"
end
end
|
class Main
index = 1
while(true)
x = gets.to_i
break if x == 0
puts "Case #{index}: #{x}"
index += 1
end
end
|
[] | 174,886
| 174,887
|
u973197167
|
ruby
|
p02396
|
cnt = 0
while true
input = STDIN.gets
cnt = 1
break if (input.to_i == 0)
puts "Case "+cnt.to_s+": "+input
cnt += 1
end
|
cnt = 0
while true
input = STDIN.gets
cnt += 1
break if (input.to_i == 0)
puts "Case "+cnt.to_s+": "+input
end
|
[
"assignment.value.change"
] | 174,888
| 174,889
|
u021428304
|
ruby
|
p02396
|
i=1
loop do
x = gets.to_i
if x == 0 then break end
puts "Count#{i} : #{x}"
i+=1
end
|
i = 1
loop do
x = gets.to_i
if x == 0 then break end
puts "Case #{i}: #{x}"
i+=1
end
|
[
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 174,895
| 174,896
|
u809985413
|
ruby
|
p02396
|
ARGF.each.with_index(1) do |num, i|
z = num.to_i
break if z == 0
puts "Case #{i}: z"
end
|
ARGF.each.with_index(1) do |num, i|
z = num.to_i
break if z == 0
puts "Case #{i}: #{z}"
end
|
[
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 174,899
| 174,900
|
u330842660
|
ruby
|
p02396
|
ARGF.each.with_index(1) do |num, i|
z = num.to_i
break if z == 0
puts "Case #{i}: "#{z}"
end
|
ARGF.each.with_index(1) do |num, i|
z = num.to_i
break if z == 0
puts "Case #{i}: #{z}"
end
|
[
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 174,901
| 174,900
|
u330842660
|
ruby
|
p02396
|
ary = []
ARGF.each_line do |line|
x = line.to_i
if x != 0
ary << x.to_i
end
end
x.each.with_index(1) do |num, i|
puts "Case #{i}: #{num}"
end
|
ary = []
ARGF.each_line do |line|
x = line.to_i
break if x == 0
ary << x.to_i
end
ary.each.with_index(1) do |num, i|
puts "Case #{i}: #{num}"
end
|
[
"control_flow.break.add",
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 174,902
| 174,903
|
u330842660
|
ruby
|
p02396
|
ARGF.each_line.with_index(1) do |line, i|
x = line.to_i
break if x == 0
puts "#{Case} #{i}: #{x}"
end
|
ARGF.each.with_index(1) do |line, i|
x = line.to_i
break if x == 0
puts "Case #{i}: #{x}"
end
|
[
"identifier.change",
"io.output.change",
"literal.string.change",
"call.arguments.change"
] | 174,909
| 174,910
|
u024069892
|
ruby
|
p02396
|
i=0
while line = gets
i+=1
if x.to_i == 0
break
end
puts "Case #{i}: #{x}"
end
|
i=0
while x = gets
i+=1
if x.to_i == 0
break
end
puts "Case #{i}: #{x}"
end
|
[
"assignment.variable.change",
"identifier.change"
] | 174,911
| 174,912
|
u565102293
|
ruby
|
p02396
|
i = 0
while x = gets do
if x.to_i != 0
puts "Case #{i}: #{x}"
else
break
end
end
|
i = 1
while x = gets do
if x.to_i != 0
puts "Case #{i}: #{x}"
i += 1
else
break
end
end
|
[
"literal.number.integer.change",
"assignment.value.change"
] | 174,913
| 174,914
|
u364560197
|
ruby
|
p02396
|
i = 0
while x = gets do
if x.to_i != 0
puts "Case #{i}: #{x}"
i += 1
else
break
end
end
|
i = 1
while x = gets do
if x.to_i != 0
puts "Case #{i}: #{x}"
i += 1
else
break
end
end
|
[
"literal.number.integer.change",
"assignment.value.change"
] | 174,915
| 174,914
|
u364560197
|
ruby
|
p02396
|
a = []
until a.last == 0 do
a.push STDIN.gets.to_i
end
cnt = 0
a.each do |i|
cnt += 1
puts "Case #{cnt}: #{i}"
end
|
a = []
until a.last == 0 do
a.push STDIN.gets.to_i
end
cnt = 0
a.each do |i|
cnt += 1
puts "Case #{cnt}: #{i}" unless i == 0
end
|
[] | 174,916
| 174,917
|
u494858865
|
ruby
|
p02396
|
num = gets.to_i
i = 1
while num != 0 do
print "Case ", i ,":", num ,"\n"
num = gets.to_i
i += 1
end
|
num = gets.to_i
i = 1
while num != 0 do
print "Case ", i ,": ", num ,"\n"
num = gets.to_i
i += 1
end
|
[
"literal.string.change",
"call.arguments.change"
] | 174,921
| 174,920
|
u004641776
|
ruby
|
p02396
|
num = []
loop do
x = gets.chomp.to_i
if x == 0 then
break
else
num << x
end
end
i = 1
num.map do |x|
if x != 0
puts 'Case ' + i.to_s + ':' + x.to_s
else
break
end
i += 1
end
|
num = []
loop do
x = gets.chomp.to_i
if x == 0 then
break
else
num << x
end
end
i = 1
num.map do |x|
if x != 0
puts 'Case ' + i.to_s + ': ' + x.to_s
else
break
end
i += 1
end
|
[
"literal.string.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 174,931
| 174,932
|
u873778695
|
ruby
|
p02396
|
i=0
while true do
num = gets.to_i
if num == 0
break
end
i=i+1
puts "case #{i}: #{num}"
end
|
i=0
while true do
num = gets.to_i
if num == 0
break
end
i=i+1
puts "Case #{i}: #{num}"
end
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change"
] | 174,933
| 174,934
|
u307525591
|
ruby
|
p02396
|
j=1
while 1
i=gets.to_i
if i==0
break
end
print "Case#{j}:#{i}\n"
j+=1
end
|
j=1
while 1
i=gets.to_i
if i==0
break
end
print "Case #{j}: #{i}\n"
j+=1
end
|
[
"literal.string.change",
"call.arguments.change"
] | 174,935
| 174,936
|
u304186356
|
ruby
|
p02396
|
cnt = 0
while true
x = gets.to_i
cnt += 1
break if (x == 0)
puts "Case i: #{x}"
end
|
i = 0
while true
x = gets.to_i
i += 1
break if (x == 0)
puts "Case #{i}: #{x}"
end
|
[
"assignment.variable.change",
"identifier.change",
"literal.string.change",
"call.arguments.change"
] | 174,937
| 174,938
|
u043406421
|
ruby
|
p02396
|
#!/usr/local/bin/ruby
i=0
while
x=gets.to_i
i+=1
if x==0
break
end
printf("Case %d:%d\n",i,x)
end
|
#!/usr/local/bin/ruby
i=0
while
x=gets.to_i
i+=1
if x==0
break
end
printf("Case %d: %d\n",i,x)
end
|
[
"literal.string.change",
"call.arguments.change"
] | 174,942
| 174,943
|
u626388686
|
ruby
|
p02396
|
i =0
while true
x = STDIN.gets
i +=1
break if x.to_i == 0
puts "Case#{i}:#{x}"
end
|
i =0
while true
x = STDIN.gets
i +=1
break if x.to_i == 0
puts "Case #{i}: #{x}"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 174,949
| 174,950
|
u648595404
|
ruby
|
p02396
|
i =0
while true
x = STDIN.gets
i +=1
break if x.to_i == 0
puts "Case#{i}: #{x}"
end
|
i =0
while true
x = STDIN.gets
i +=1
break if x.to_i == 0
puts "Case #{i}: #{x}"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 174,951
| 174,950
|
u648595404
|
ruby
|
p02396
|
arr = Array.new
while str = STDIN.gets
break if str.chomp == "0"
arr.push(str.to_i)
end
i=0
until arr.length==i
print "Case ",i+1, ":", arr[i],"\n"
i=i+1
end
|
arr = Array.new
while str = STDIN.gets
break if str.chomp == "0"
arr.push(str.to_i)
end
i=0
until arr.length==i
print "Case ",i+1, ": ", arr[i],"\n"
i=i+1
end
|
[
"literal.string.change",
"call.arguments.change"
] | 174,954
| 174,955
|
u665389142
|
ruby
|
p02396
|
counter=1
x=gets.to_i
until x==0 do
printf("case %d:%d\n",counter,x)
x=gets.to_i
counter=counter+1
end
|
counter=1
x=gets.to_i
until x==0 do
printf("Case %d: %d\n",counter,x)
x=gets.to_i
counter=counter+1
end
|
[
"literal.string.change",
"call.arguments.change"
] | 174,956
| 174,957
|
u665389142
|
ruby
|
p02396
|
i = 0
a = Array.new
a[0] = gets.to_i
while a[i] != 0 do
i += 1
a[i] = gets.to_i
end
i = 0
while a[i] != 0 do
puts "Case #{i}: #{a[i]}"
i += 1
end
|
i = 0
a = Array.new
a[0] = gets.to_i
while a[i] != 0 do
i += 1
a[i] = gets.to_i
end
i = 0
while a[i] != 0 do
puts "Case #{i+1}: #{a[i]}"
i += 1
end
|
[
"literal.string.change",
"call.arguments.change"
] | 174,961
| 174,962
|
u600321313
|
ruby
|
p02396
|
i = 1; while (n = gets.chomp.to_i) != 0 do
puts "Case#{i}: #{n}"
i = i + 1
end
|
i = 1; while (n = gets.chomp.to_i) != 0 do
puts "Case #{i}: #{n}"
i = i + 1
end
|
[
"literal.string.change",
"call.arguments.change"
] | 174,963
| 174,964
|
u261074410
|
ruby
|
p02396
|
lines = $stdin.read.split(?\n).map(&:to_i)
lines.each.with_index(1) do |line, i|
puts "Case #{i}: #{line}"
i += 1
end
|
lines = $stdin.read.split(?\n).map(&:to_i)
lines.each.with_index(1) do |line, i|
break if line == 0
puts "Case #{i}: #{line}"
i += 1
end
|
[] | 174,973
| 174,974
|
u854587684
|
ruby
|
p02396
|
c = 1
while true
buf = gets.to_i
unless buf == 0
puts 'Case #{c}: #{buf}'
else
break
end
c += 1
end
|
c = 1
while true
buf = gets.to_i
if buf != 0
puts "Case #{c}: #{buf}"
else
break
end
c += 1
end
|
[
"misc.opposites",
"expression.operator.compare.change",
"expression.operation.binary.change",
"literal.string.change",
"call.arguments.change"
] | 174,978
| 174,977
|
u861698758
|
ruby
|
p02396
|
c = 1
while true
buf = gets.to_i
if buf != 0
puts 'Case #{c}: #{buf}'
else
break
end
c += 1
end
|
c = 1
while true
buf = gets.to_i
if buf != 0
puts "Case #{c}: #{buf}"
else
break
end
c += 1
end
|
[
"literal.string.change",
"call.arguments.change"
] | 174,979
| 174,977
|
u861698758
|
ruby
|
p02396
|
i = 0
user = {}
while num = gets do
n = num.to_i
if n == 0
break
end
i += 1
user[i] = "Case #{i}:#{n}"
end
user.each do |key,value|
puts "#{value}"
end
|
i = 0
user = {}
while num = gets do
n = num.to_i
if n == 0
break
end
i += 1
user[i] = "Case #{i}: #{n}"
end
user.each do |key,value|
puts "#{value}"
end
|
[
"literal.string.change",
"assignment.value.change"
] | 175,008
| 175,009
|
u130908386
|
ruby
|
p02396
|
count = 1
while true do
input_data = STDIN.gets
if input_data.to_i == 0
break
end
print "Case" + count.to_s + ": " + input_data
count += 1
end
|
count = 1
while true do
input_data = STDIN.gets
if input_data.to_i == 0
break
end
print "Case " + count.to_s + ": " + input_data
count += 1
end
|
[
"literal.string.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 175,010
| 175,011
|
u099156261
|
ruby
|
p02396
|
i=1
while
x = gets.to_i
if (x == 0)
break
end
puts "Case #{i}:#{x}"
i = i+1
end
|
i=1
while
x = gets.to_i
if (x == 0)
break
end
puts "Case #{i}: #{x}"
i = i+1
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,017
| 175,013
|
u232170203
|
ruby
|
p02396
|
i = 0
while i do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}: #{x}"
end
|
[
"identifier.replace.remove",
"literal.replace.add",
"literal.string.change",
"call.arguments.change"
] | 175,029
| 175,023
|
u407138207
|
ruby
|
p02396
|
i = 0
while i do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}: #{x}"
end
|
[
"identifier.replace.remove",
"literal.replace.add",
"literal.string.change",
"call.arguments.change"
] | 175,031
| 175,023
|
u407138207
|
ruby
|
p02396
|
i = 0
while i do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}: #{x}"
end
|
[
"identifier.replace.remove",
"literal.replace.add",
"literal.string.change",
"call.arguments.change"
] | 175,032
| 175,023
|
u407138207
|
ruby
|
p02396
|
i = 0
while i do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}: #{x}"
end
|
[
"identifier.replace.remove",
"literal.replace.add",
"literal.string.change",
"call.arguments.change"
] | 175,037
| 175,023
|
u407138207
|
ruby
|
p02396
|
i = 0
while i do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case#{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}: #{x}"
end
|
[
"identifier.replace.remove",
"literal.replace.add",
"literal.string.change",
"call.arguments.change"
] | 175,038
| 175,023
|
u407138207
|
ruby
|
p02396
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i +=1
puts "Case #{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}: #{x}"
end
|
[
"assignment.value.change",
"literal.string.change",
"call.arguments.change"
] | 175,040
| 175,044
|
u407138207
|
ruby
|
p02396
|
i =0
while true
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}: #{x}"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,045
| 175,044
|
u407138207
|
ruby
|
p02396
|
i =0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}: #{x}"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,046
| 175,044
|
u407138207
|
ruby
|
p02396
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}: #{x}"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,047
| 175,044
|
u407138207
|
ruby
|
p02396
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}: #{x}"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,049
| 175,044
|
u407138207
|
ruby
|
p02396
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}:#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}: #{x}"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,050
| 175,044
|
u407138207
|
ruby
|
p02396
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i += 1
puts "case"+ " " + "#{i}" + ":" + " " +"#{x}"
end
|
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case"+ " " + "#{i}" + ":" + " " +"#{x}"
end
|
[
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 175,053
| 175,052
|
u407138207
|
ruby
|
p02396
|
count = 0
while line = gets
n = line.chomp
break if n == 0
count += 1
puts "Case " + count.to_s + ": " + n
end
|
count = 0
while line = gets
n = line.chomp
break if n == "0"
count += 1
puts "Case " + count.to_s + ": " + n
end
|
[
"control_flow.branch.if.condition.change"
] | 175,054
| 175,055
|
u458302536
|
ruby
|
p02396
|
i = 1
while str = $stdin.gets
a = str.strip
a = a.to_i
break if a == 0
p "Case #{i}: #{a}"
i += 1
end
|
i = 1
while str = $stdin.gets
a = str.strip
a = a.to_i
break if a == 0
puts "Case #{i}: #{a}"
i += 1
end
|
[
"call.function.change",
"io.output.change"
] | 175,060
| 175,061
|
u364115699
|
ruby
|
p02396
|
numsArray = Array.new
numsArray[0] = 0
i = 1
loop {
numsArray[i] = gets.to_i
if numsArray[i] == 0
break
end
i += 1
}
i -= 1
caseNumber = 1
i.times do
print "Case ", caseNumber, ": ", nums[caseNumber], "\n"
caseNumber += 1
end
|
numsArray = Array.new
numsArray[0] = 0
i = 1
loop {
numsArray[i] = gets.to_i
if numsArray[i] == 0
break
end
i += 1
}
i -= 1
caseNumber = 1
i.times do
print "Case ", caseNumber, ": ", numsArray[caseNumber], "\n"
caseNumber += 1
end
|
[
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 175,071
| 175,072
|
u517018006
|
ruby
|
p02396
|
i = 0
while (n = gets.chomp) != nil
puts "Case #{i+=1}:#{n}"
end
|
i = 0
while (n = gets.chomp) != '0'
puts "Case #{i+=1}: #{n}"
end
|
[
"expression.operation.binary.change",
"literal.string.change",
"call.arguments.change"
] | 175,078
| 175,079
|
u295404099
|
ruby
|
p02396
|
i = 0
while (n = gets.chomp) != '0'
puts "Case #{i+=1}:#{n}"
end
|
i = 0
while (n = gets.chomp) != '0'
puts "Case #{i+=1}: #{n}"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,080
| 175,079
|
u295404099
|
ruby
|
p02396
|
i = 0
while (n = gets.chomp) != '0'
puts "Case #{i+=1}:#{n}\n"
end
|
i = 0
while (n = gets.chomp) != '0'
puts "Case #{i+=1}: #{n}"
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,081
| 175,079
|
u295404099
|
ruby
|
p02396
|
1.step do |i|
n = gets.to_i
break if n.zero?
puts "Case #{i}: ¥{n}"
end
|
1.step do |i|
n = gets.to_i
break if n.zero?
puts "Case #{i}: #{n}"
end
|
[
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 175,095
| 175,096
|
u483014949
|
ruby
|
p02396
|
i = 1
while (a = gets.to_i) > 0
puts "Case #{i}: #{a}\n}"
i += 1
end
|
i = 1
while (a = gets.to_i) != 0
puts "Case #{i}: #{a}"
i += 1
end
|
[
"expression.operator.compare.change",
"expression.operation.binary.change",
"literal.string.change",
"call.arguments.change"
] | 175,097
| 175,098
|
u087014397
|
ruby
|
p02396
|
i = 1
while (a = gets.to_i) != 0
puts "Case #{i}: #{a}\n}"
i += 1
end
|
i = 1
while (a = gets.to_i) != 0
puts "Case #{i}: #{a}"
i += 1
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,099
| 175,098
|
u087014397
|
ruby
|
p02396
|
i = 1
while (a = gets.to_i) != 0
puts "Case #{i}: #{a}}"
i += 1
end
|
i = 1
while (a = gets.to_i) != 0
puts "Case #{i}: #{a}"
i += 1
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,100
| 175,098
|
u087014397
|
ruby
|
p02396
|
i = 1
x = 1
until x.zero?
x = gets.chomp.to_i
case x
when 0
break
else
puts "Case#{i}: #{x}"
i += 1
end
end
|
i = 1
x = 1
until x.zero?
x = gets.to_i
case x
when 0
break
else
puts "Case #{i}: #{x}"
i += 1
end
end
|
[
"call.remove",
"literal.string.change",
"call.arguments.change"
] | 175,101
| 175,102
|
u732447686
|
ruby
|
p02396
|
i = 1
x = 1
until x.zero?
x = gets.to_i
case x
when 0
break
else
puts "Case#{i}: #{x}"
i += 1
end
end
|
i = 1
x = 1
until x.zero?
x = gets.to_i
case x
when 0
break
else
puts "Case #{i}: #{x}"
i += 1
end
end
|
[
"literal.string.change",
"call.arguments.change"
] | 175,103
| 175,102
|
u732447686
|
ruby
|
p02394
|
W, H, x, y, r = gets.split.map(&:to_i)
if (y+r >= H || y-r <= 0) || (x+r >= W || x-r <= 0)
puts 'No'
else
puts 'Yes'
end
|
W, H, x, y, r = gets.split.map(&:to_i)
if (y+r > H || y-r < 0) || (x+r > W || x-r < 0)
puts 'No'
else
puts 'Yes'
end
|
[
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 175,625
| 175,626
|
u732447686
|
ruby
|
p02394
|
def check(w, h, x, y, r)
if x < r
return "No"
end
if y < r
return "No"
end
if x > w - r
return "No"
end
if y > h - r
return "No"
end
end
w, h, x, y, r = gets.split.map &:to_i
puts check(w, h, x, y, r)
|
def check(w, h, x, y, r)
if x < r
return "No"
end
if y < r
return "No"
end
if x > w - r
return "No"
end
if y > h - r
return "No"
end
return "Yes"
end
w, h, x, y, r = gets.split.map &:to_i
puts check(w, h, x, y, r)
|
[
"control_flow.return.add"
] | 175,627
| 175,628
|
u534156032
|
ruby
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.