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 9
values |
|---|---|---|---|---|---|---|---|
p02397 | loop {
x = gets.split.map(&:to_i)
break if a == [0,0]
puts a.sort.join(" ")
}
| loop {
x = gets.split.map(&:to_i)
break if x == [0, 0]
puts x.sort.join(" ")
}
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"call.arguments.change"
] | 177,805 | 177,806 | u456075975 | ruby |
p02397 | loop {
x = gets.split.map(&:to_i)
break if a == [0,0]
puts x.sort.join(" ")
}
| loop {
x = gets.split.map(&:to_i)
break if x == [0, 0]
puts x.sort.join(" ")
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 177,807 | 177,806 | u456075975 | ruby |
p02397 | loop {
x = gets.split.map(&:to_i)
break if a == [0, 0]
puts x.sort.join(" ")
}
| loop {
x = gets.split.map(&:to_i)
break if x == [0, 0]
puts x.sort.join(" ")
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 177,808 | 177,806 | u456075975 | ruby |
p02397 | loop {
x = gets.split.map(&:to_i)
break if a == [0,0]
puts a.sort.join(" ")
}
| loop {
x = gets.split.map(&:to_i)
break if x == [0, 0]
puts x.sort.join(" ")
}
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"call.arguments.change"
] | 177,805 | 177,809 | u456075975 | ruby |
p02397 | loop {
x = gets.split.map(&:to_i)
break if a == [0,0]
puts x.sort.join(" ")
}
| loop {
x = gets.split.map(&:to_i)
break if x == [0, 0]
puts x.sort.join(" ")
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 177,807 | 177,809 | u456075975 | ruby |
p02397 | loop {
x = gets.split.map(&:to_i)
break if a == [0, 0]
puts x.sort.join(" ")
}
| loop {
x = gets.split.map(&:to_i)
break if x == [0, 0]
puts x.sort.join(" ")
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 177,808 | 177,809 | u456075975 | ruby |
p02397 | while true
nums = STDIN.gets.split(" ").map(&:to_i)
break if (nums[0]==3001&&nums[1]==3001)
puts nums.sort.join(" ")
end
| while true
nums = STDIN.gets.split(" ").map(&:to_i)
break if (nums[0]==0&&nums[1]==0)
puts nums.sort.join(" ")
end
| [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 177,811 | 177,812 | u021428304 | ruby |
p02397 | loop do
x,y = gets.split.map(&:to_i)
if x == 0 && y ==0 then break end
if x < y
s = y
y = x
x = s
end
puts "#{x} #{y}"
end
| loop do
x,y = gets.split.map(&:to_i)
if x == 0 && y ==0 then break end
if x > y
s = y
y = x
x = s
end
puts "#{x} #{y}"
end
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 177,813 | 177,814 | u809985413 | ruby |
p02397 | a = Array.new { Array.new(2) }
loop do
a << gets.split().map(&:to_i).sort
break if a.last == [0,0]
end
a.each do |v|
puts "#{v[0]} #{v[1]}"
end | a = Array.new { Array.new(2) }
loop do
a << gets.split().map(&:to_i).sort
break if a.last == [0,0]
end
a.pop
a.each do |v|
puts "#{v[0]} #{v[1]}"
end | [
"call.add"
] | 177,815 | 177,816 | u739433776 | ruby |
p02397 | loop do
x, y = gets.chomp.split.map(&:to_i)
break if x.zero? and y.zero?
if x < y
puts "#{x} < #{y}"
else
puts "#{y} < #{x}"
end
end | loop do
x, y = gets.chomp.split.map(&:to_i)
break if x.zero? and y.zero?
if x < y
puts "#{x} #{y}"
else
puts "#{y} #{x}"
end
end | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 177,819 | 177,820 | u765748067 | ruby |
p02397 | while 1 do
x = gets.chomp.split.map(&:to_i).sort
if x[0] == 0 && x[0] == 0
break
else
puts x.join(" ")
end
end | while 1 do
x = gets.chomp.split.map(&:to_i).sort
if x[0] == 0 && x[1] == 0
break
else
puts x.join(" ")
end
end | [
"literal.number.integer.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 177,823 | 177,824 | u458804662 | ruby |
p02397 | y = [[false]]
a = true
b = gets.split(" ").map(&:to_i)
while a
begin
a = y[b[0]][b[1]]
rescue
puts b.sort.join(" ")
b = gets.split(" ").map(&:to_i)
end
end | y = [[[false]]]
a = true
b = gets.split(" ").map(&:to_i)
while a
begin
a = y[b[0]][b[1]][0]
rescue
puts b.sort.join(" ")
b = gets.split(" ").map(&:to_i)
end
end | [] | 177,825 | 177,826 | u708862509 | ruby |
p02397 | loop do
x,y = gets.split.map(&:to_i)
break if (x==0&&y==0)
if x < y then
puts "#{x} #{y}"
else
puts "#{x} #{y}"
end
end | loop do
x,y = gets.split.map(&:to_i)
break if (x==0&&y==0)
if x < y then
puts "#{x} #{y}"
else
puts "#{y} #{x}"
end
end | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 177,837 | 177,838 | u648595404 | ruby |
p02397 | loop do
x, y = gets.chomp.split.sort.map(&:to_i)
if x == 0 && y == 0
break
end
puts "#{x} #{y}"
end | loop do
x, y = gets.chomp.split.map(&:to_i).sort
if x == 0 && y == 0
break
else
puts "#{x} #{y}"
end
end | [
"call.remove",
"call.add"
] | 177,839 | 177,840 | u960296069 | ruby |
p02397 | while (x, y = gets.split.map &:to_i != [0, 0])
puts [x, y] * (" ")
end | while (x, y = gets.split.map(&:to_i)) != [0, 0]
puts [x, y].sort * (" ")
end | [
"call.arguments.change",
"call.add"
] | 177,845 | 177,844 | u569541270 | ruby |
p02397 | while (x, y = gets.split.map(&:to_i) != [0, 0])
puts [x, y] * (" ")
end | while (x, y = gets.split.map(&:to_i)) != [0, 0]
puts [x, y].sort * (" ")
end | [
"call.add"
] | 177,847 | 177,844 | u569541270 | ruby |
p02397 | while (x, y = gets.split.map(&:to_i)) != [0, 0]
puts [x, y] * (" ")
end | while (x, y = gets.split.map(&:to_i)) != [0, 0]
puts [x, y].sort * (" ")
end | [
"call.add"
] | 177,848 | 177,844 | u569541270 | ruby |
p02397 | while line = gets do
a, b = line.split.map(&:to_i)
a == 0 && b == 0 ? break : (a > b ? puts("#{a} #{b}") : puts("#{b} #{a}"))
end | while line = gets do
a, b = line.split.map(&:to_i)
a == 0 && b == 0 ? break : (a > b ? puts("#{b} #{a}") : puts("#{a} #{b}"))
end | [
"literal.string.change",
"call.arguments.change"
] | 177,849 | 177,850 | u750346935 | ruby |
p02397 | while line = gets do
break if line == "0 0"
puts line.split(" ").map(&:to_i).sort.join(" ")
end | while line = gets.chomp do
break if line == "0 0"
puts line.split(" ").map(&:to_i).sort.join(" ")
end | [
"call.add"
] | 177,851 | 177,852 | u709642619 | ruby |
p02397 | begin
a = gets().split.map { |e| e.to_i}.sort
if a[0] != 0 && a[1] != 0
printf("#{a[0]} #{a[1]}\n")
end
end while a[0] != 0 && a[1] != 0 | begin
a = gets().split.map { |e| e.to_i}.sort
if a[0] != 0 || a[1] != 0
printf("#{a[0]} #{a[1]}\n")
end
end while a[0] != 0 || a[1] != 0 | [
"misc.opposites",
"control_flow.branch.if.condition.change",
"expression.operation.binary.change"
] | 177,857 | 177,858 | u641479950 | ruby |
p02397 | catch(:label) do
while line = gets
throw :label if line == "0 0\n"
a = gets.split(" ")
p_0 = a[0].to_i
p_1 = a[1].to_i
if p_0 > p_1
a[0] = p_1
a[1] = p_0
else
a[0] = p_0
a[1] = p_1
end
puts a[0].to_s + " " + a[1].to_s + "\n"
end
end | catch(:label) do
while line = gets
throw :label if line == "0 0\n"
a = line.chomp.split(" ")
p_0 = a[0].to_i
p_1 = a[1].to_i
if p_0 > p_1
a[0] = p_1
a[1] = p_0
else
a[0] = p_0
a[1] = p_1
end
puts a[0].to_s + " " + a[1].to_s + "\n"
end
end | [
"assignment.value.change",
"identifier.change",
"io.output.change",
"call.add"
] | 177,859 | 177,860 | u425445183 | ruby |
p02397 | while true
a = get.split(" ").map &:to_i
if a[0]==0 && a[1]==0
break
end
puts a.sort.join(" ")
end | while true
a = gets.split(" ").map &:to_i
if a[0]==0 && a[1]==0
break
end
puts a.sort.join(" ")
end | [
"assignment.value.change",
"identifier.change"
] | 177,863 | 177,864 | u393619373 | ruby |
p02397 | while true do
tmp = gets.split.map(&:to_i)
if tmp[0] == 0 && tmp[0] == 0
break
end
puts num.sort!.join(" ")
end | while true do
num = gets.split.map(&:to_i)
if num[0] == 0 && num[1] == 0
break
end
puts num.sort!.join(" ")
end | [
"assignment.variable.change",
"identifier.change",
"control_flow.branch.if.condition.change",
"literal.number.integer.change",
"variable_access.subscript.index.change"
] | 177,866 | 177,867 | u734427071 | ruby |
p02397 | while true do
tmp = gets.split.map(&:to_i)
if tmp[0] == 0 && tmp[0] == 0
break
end
puts num.sort!.join(" ")
end | loop do
num = gets.split.map(&:to_i)
if num[0] == 0 && num[1] == 0
break
end
puts num.sort!.join(" ")
end | [
"assignment.variable.change",
"identifier.change",
"control_flow.branch.if.condition.change",
"literal.number.integer.change",
"variable_access.subscript.index.change"
] | 177,866 | 177,869 | u734427071 | ruby |
p02397 | while true do
tmp = gets.split.map(&:to_i)
if tmp[0] == 0 && tmp[0] == 0
break
end
puts num.sort!.join(" ")
end | loop do
num = gets.split.map(&:to_i)
if num[0] == 0 && num[1] == 0
break
end
puts num.sort!.join(" ")
end | [
"assignment.variable.change",
"identifier.change",
"control_flow.branch.if.condition.change",
"literal.number.integer.change",
"variable_access.subscript.index.change"
] | 177,866 | 177,870 | u734427071 | ruby |
p02397 | loop do
tmp = gets.split.map(&:to_i)
if tmp[0] == 0 && tmp[1] == 0
break
end
puts num.sort!.join(" ")
end | loop do
num = gets.split.map(&:to_i)
if num[0] == 0 && num[1] == 0
break
end
puts num.sort!.join(" ")
end | [
"assignment.variable.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 177,871 | 177,870 | u734427071 | ruby |
p02397 | loop{
a,b=gets.split.map &:to_i
if a==0&&B==0
break
elsif a<b
puts "#{a} #{b}"
else
puts "#{b} #{a}"
end
} | loop{
a,b=gets.split.map &:to_i
if a==0&&b==0
break
elsif a<b
puts "#{a} #{b}"
else
puts "#{b} #{a}"
end
} | [
"control_flow.branch.if.condition.change"
] | 177,880 | 177,881 | u279605379 | ruby |
p02397 | i = 1
while ((i <= 3000) && ((x,y = gets.split(" ").map(&:to_i)).select{|j| j != 0}.length == 2)) do
puts ((x-y)<0) ? [x,y].join(" ") : [y,x].join(" ")
i += 1
end | i = 1
while ((i <= 3000) && ((x,y = gets.split(" ").map(&:to_i)).select{|j| j != 0}.length > 0)) do
puts ((x-y)<0) ? [x,y].join(" ") : [y,x].join(" ")
i += 1
end | [] | 177,887 | 177,888 | u213421924 | ruby |
p02397 | input = []
loop do
input.push(gets.split(' ').map(&:to_i))
if input[-1][0] == 0 && input[-1][1] == 0
input.pop
break
end
end
input.length.times do |i|
x = input[i][0]
y = input[i][1]
if x > y
puts '%d %d' % [y, x]
else
print '%d %d' % [x, y]
end
end | input = []
loop do
input.push(gets.split(' ').map(&:to_i))
if input[-1][0] == 0 && input[-1][1] == 0
input.pop
break
end
end
input.length.times do |i|
x = input[i][0]
y = input[i][1]
if x > y
puts '%d %d' % [y, x]
else
puts '%d %d' % [x, y]
end
end | [
"identifier.change",
"io.output.change"
] | 177,891 | 177,892 | u737594828 | ruby |
p02397 | x, y = gets.chomp.split(' ').map(&:to_i)
while x != 0 && y != 0
if x < y
x=x.to_s
y=y.to_s
puts (x+' '+y)
else
x = x.to_s
y = y.to_s
puts(y+' '+x)
end
x, y = gets.chomp.split(' ').map(&:to_i)
end | x, y = gets.chomp.split(' ').map(&:to_i)
while x != 0 || y != 0
if x < y
x=x.to_s
y=y.to_s
puts (x+' '+y)
else
x=x.to_s
y=y.to_s
puts (y+' '+x)
end
x, y = gets.chomp.split(' ').map(&:to_i)
end | [
"misc.opposites",
"expression.operation.binary.change"
] | 177,893 | 177,894 | u067629267 | ruby |
p02397 | x, y = gets.chomp.split(' ').map(&:to_i)
while x != 0 && y != 0
if x < y
x=x.to_s
y=y.to_s
puts (x+' '+y)
else
x=x.to_s
y=y.to_s
puts (y+' '+x)
end
x, y = gets.chomp.split(' ').map(&:to_i)
end | x, y = gets.chomp.split(' ').map(&:to_i)
while x != 0 || y != 0
if x < y
x=x.to_s
y=y.to_s
puts (x+' '+y)
else
x=x.to_s
y=y.to_s
puts (y+' '+x)
end
x, y = gets.chomp.split(' ').map(&:to_i)
end | [
"misc.opposites",
"expression.operation.binary.change"
] | 177,895 | 177,894 | u067629267 | ruby |
p02397 | while true
a,b=gets.split.map &:to_i
if a=0 && b=0
break
end
puts [a,b].sort*" "
end
| while true
a,b=gets.split.map &:to_i
if a==0 && b==0
break
end
puts ([a,b].sort)*" "
end
| [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo",
"call.arguments.change"
] | 177,899 | 177,898 | u274307745 | ruby |
p02398 | a,b,c = gets.split.map(&:to_i)
cnt = 0
for i in a..b do
cnt +=1 if c%x == 0
end
puts cnt
| a,b,c = gets.split.map(&:to_i)
cnt = 0
for i in a..b do
cnt += 1 if c%i == 0
end
puts cnt
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 180,426 | 180,427 | u456075975 | ruby |
p02398 | a,b,c = gets.split.map(&:to_i)
cnt = 0
for i in a..b do
cnt += 1 if c%x == 0
end
puts cnt
| a,b,c = gets.split.map(&:to_i)
cnt = 0
for i in a..b do
cnt += 1 if c%i == 0
end
puts cnt
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 180,428 | 180,427 | u456075975 | ruby |
p02398 | a,b,c = gets.split.map(&:to_i)
cnt = 0
for i in a..b do
cnt += 1 if c%x == 0
end
puts cnt
| a,b,c = gets.split.map(&:to_i)
cnt = 0
for i in a..b do
cnt += 1 if c%i == 0
end
puts cnt
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 180,429 | 180,427 | u456075975 | ruby |
p02398 | a, b, c = gets.split.map(&:to_i)
puts (a..b).count { |n| c & n == 0 } | a, b, c = gets.split.map(&:to_i)
puts (a..b).count { |n| c % n == 0 } | [
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 180,433 | 180,434 | u390149337 | ruby |
p02398 | a, b, c = gets.split(" ").map{|x| x.to_i}
div = 0
for i in a..b
c % i == 0 ? divsor += 1 : self
end
puts divsor | a, b, c = gets.split(" ").map{|x| x.to_i}
div = 0
for i in a..b
c % i == 0 ? div += 1 : self
end
puts div | [
"identifier.change",
"call.arguments.change"
] | 180,435 | 180,436 | u364560197 | ruby |
p02398 | a, b, c = ARGF.split.map(&:to_i)
ary = []
(a..b).each do |n|
if c % n == 0
ary << n
end
end
puts ary.count | a, b, c = ARGF.gets.split.map(&:to_i)
ary = []
(a..b).each do |n|
if c % n == 0
ary << n
end
end
puts ary.count | [
"call.add"
] | 180,437 | 180,438 | u330842660 | ruby |
p02398 | a, b, c = ARGF.gets.split.map(&:to_i)
num = 0
(a..b).map{ |i| num += 1; c & i }
puts num | a, b, c = ARGF.gets.split.map(&:to_i)
num = 0
(a..b).map{ |i| num += 1[c % i] }
puts num | [
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 180,439 | 180,440 | u102042957 | ruby |
p02398 | a, b, c = ARGF.gets.split.map(&:to_i)
num = 0
(a..b).map{ |i| num += 1; c % i }
puts num | a, b, c = ARGF.gets.split.map(&:to_i)
num = 0
(a..b).map{ |i| num += 1[c % i] }
puts num | [
"variable_access.subscript.index.change"
] | 180,441 | 180,440 | u102042957 | ruby |
p02398 | a, b, c = gets.split.map(&:to_i)
for i in a..b do
ans += 1 if c % i == 0
end
puts ans | a, b, c = gets.split.map(&:to_i)
ans = 0
for i in a..b do
ans += 1 if c % i == 0
end
puts ans | [
"assignment.add"
] | 180,444 | 180,445 | u061116826 | ruby |
p02398 | i = 0
a = gets.split.map(&:to_i).sort
for num in a[0]..a[1] do
if a[2]%num == 0 then
i += 1
end
end
puts "#{i}" | i = 0
a = gets.split.map(&:to_i)
for num in a[0]..a[1] do
if a[2]%num == 0 then
i += 1
end
end
puts "#{i}" | [
"call.remove"
] | 180,446 | 180,447 | u020732400 | ruby |
p02398 | ary = gets.split.map(&:to_i)
a = ary[0]
b = ary[1]
c = ary[2]
counter = 0
a..b.each do |item|
counter += 1 if c % item == 0
end
puts counter | ary = gets.split.map(&:to_i)
a = ary[0]
b = ary[1]
c = ary[2]
counter = 0
(a..b).each do |item|
counter += 1 if c % item == 0
end
puts counter | [] | 180,452 | 180,453 | u635383114 | ruby |
p02398 | a,b,c=gets.split.map(&:to_i)
puts (a..b).to_a.select{|n| n % c == 0}.size | a,b,c=gets.split.map(&:to_i)
puts (a..b).to_a.select{|n| c % n == 0}.size | [
"expression.operation.binary.remove"
] | 180,460 | 180,461 | u361501341 | ruby |
p02398 | a, b, c = gets.split.map(&:to_i)
cnt = 0
a.upto(b) { |n| cnt += 1 if c % n == 0 }
puts c | a, b, c = gets.split.map(&:to_i)
cnt = 0
a.upto(b) { |n| cnt += 1 if c % n == 0 }
puts cnt | [
"identifier.change",
"call.arguments.change"
] | 180,462 | 180,463 | u281180011 | ruby |
p02398 | a = gets.split(" ").map{|x| x.to_i}
counter=0
for i in a[0]...a[1]
if a[2]%i==0
counter+=1
end
end
print("#{counter}\n") | a = gets.split(" ").map{|x| x.to_i}
counter=0
for i in a[0]..a[1]
if a[2]%i==0
counter+=1
end
end
print("#{counter}\n") | [] | 180,464 | 180,465 | u147878192 | ruby |
p02396 | in_datas = []
loop {
in_data = gets.split
break if in_data == ["0"]
in_datas << in_data[0].to_i
}
in_datas.each_with_index do |elem, i|
printf("Case %d: %d\n", i + i, elem)
end
| in_datas = []
loop {
in_data = gets.split
break if in_data == ["0"]
in_datas << in_data[0].to_i
}
in_datas.each_with_index do |elem, i|
printf("Case %d: %d\n", i + 1, elem)
end
| [
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 180,597 | 180,598 | u592742011 | ruby |
p02396 | count = 0
loop do
n = gets.chomp.to_i
break if n == 0
count += 1
puts "Case #{count}:#{n}"
end | count = 0
loop do
n = gets.chomp.to_i
break if n == 0
count += 1
puts "Case #{count}: #{n}"
end | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 180,601 | 180,602 | u786355593 | ruby |
p02398 | ary = gets.chomp.sprit()
a = ary[0].to_i
b = ary[1].to_i
c = ary[2].to_i
n = 0
for i in a..b
if c%i == 0
n += 1
end
end
puts n | ary = gets.chomp.split()
a = ary[0].to_i
b = ary[1].to_i
c = ary[2].to_i
n = 0
for i in a..b
if c%i == 0
n += 1
end
end
puts n | [
"assignment.value.change",
"identifier.change"
] | 181,925 | 181,926 | u535246834 | ruby |
p02398 | a,b,c = gets.split.map(&:to_i)
for i in a..b
if c%i == 0
n+=1
end
end
puts n | a,b,c = gets.split.map(&:to_i)
n = 0
for i in a..b
if c%i == 0
n+=1
end
end
puts n | [
"assignment.add"
] | 181,932 | 181,933 | u275934044 | ruby |
p02398 | a,b,n = gets.chomp.split(" ").map &:to_i
c = 0
[a..b].each { |i|
c += 1 if n % i == 0
}
puts c | a,b,n = gets.chomp.split(" ").map &:to_i
c = 0
(a..b).each { |i|
c += 1 if n % i == 0
}
puts c | [] | 181,934 | 181,935 | u281257618 | ruby |
p02398 | num = gets.split.map(&:to_i)
count = 0
while temp <= num[1] do
if num[2]%num[0] == 0
count = count+1
end
num[0] = num[0]+1
end
puts count | num = gets.split.map(&:to_i)
count = 0
while num[0] <= num[1] do
if num[2]%num[0] == 0
count = count+1
end
num[0] = num[0]+1
end
puts count | [
"expression.operation.binary.change"
] | 181,943 | 181,944 | u734427071 | ruby |
p02398 | a,b,c = gets.split.map(&:to_i)
cnt = 0
for i in a...b do
cnt += 1 if c%i==0
end
puts cnt | a,b,c = gets.split.map(&:to_i)
cnt = 0
for i in a..b do
cnt += 1 if c%i==0
end
puts cnt | [] | 181,945 | 181,946 | u914140574 | ruby |
p02398 |
a,b,c = gets.split(" ").map(&to_i)
i = 0;
for num in a..b do
if c%num == 0
i = i+1
end
end
puts i |
a,b,c = gets.split(" ").map(&:to_i)
i = 0;
for num in a..b do
if c%num == 0
i = i+1
end
end
puts i | [
"assignment.value.change",
"call.arguments.change"
] | 181,951 | 181,952 | u232170203 | ruby |
p02398 | a,b,c = gets.chomp.split(" ").map(&:to_i)
count = 0
for i in a..b do
count += 1 if c % d == 0
end
puts count | a,b,c = gets.chomp.split(" ").map(&:to_i)
count = 0
for d in a..b
count += 1 if c % d == 0
end
puts count | [
"identifier.change"
] | 181,956 | 181,954 | u407138207 | ruby |
p02398 | a,b,c = gets.chomp.split(" ").map(&:to_i)
count = 0
for i in a..b do
count += 1 if c % d == 0
end
puts count | a,b,c = gets.chomp.split(" ").map(&:to_i)
count = 0
for d in a..b
count += 1 if c % d == 0
end
puts count | [
"identifier.change"
] | 181,957 | 181,954 | u407138207 | ruby |
p02398 |
a,b,c = gets.chomp.split(" ").map(&:to_i)
count = 0
for i in a..b
count += 1 if c % d == 0
end
puts count | a,b,c = gets.chomp.split(" ").map(&:to_i)
count = 0
for d in a..b
count += 1 if c % d == 0
end
puts count | [
"identifier.change"
] | 181,958 | 181,954 | u407138207 | ruby |
p02398 | a, b, c = gets.chomp.split(" ").mao(&:to_i)
count = 0
(a..b).each do |n|
count += 1 if c % n == 0
end
puts count | a, b, c = gets.chomp.split(" ").map(&:to_i)
count = 0
(a..b).each do |n|
count += 1 if c % n == 0
end
puts count | [
"assignment.value.change",
"identifier.change"
] | 181,968 | 181,969 | u720435069 | ruby |
p02398 | a, b, c = gets.split.map(&:to_i)
cnt = 0
for i in a..b
if c % i == 0
cnt += 1
end
end
p cnt.to_s | a, b, c = gets.split.map(&:to_i)
cnt = 0
for i in a..b
if c % i == 0
cnt += 1
end
end
puts (cnt.to_s) | [
"call.function.change",
"io.output.change",
"call.arguments.change"
] | 181,970 | 181,971 | u067629267 | ruby |
p02398 | a, b, c = gets.split.map(&:to_i)
count = 0
while b > a
if (c % a) == 0
count += 1
end
a += 1
end
puts count | # Your code here!
a, b, c = gets.split.map(&:to_i)
count = 0
while b >= a
if (c % a) == 0
count += 1
end
a += 1
end
puts count | [
"expression.operator.compare.change",
"expression.operation.binary.change"
] | 181,972 | 181,973 | u401720175 | ruby |
p02398 | a, b, c = gets.chomp.split.map(&:to_i)
num = 0
for i in a..b do
if c%i == 0
count +=1
end
end
puts count
| a, b, c = gets.chomp.split.map(&:to_i)
num = 0
for i in a..b do
if c%i == 0
num +=1
end
end
puts num
| [
"identifier.change",
"call.arguments.change"
] | 181,974 | 181,975 | u087014397 | ruby |
p02398 | a, b, c = gets.split(' ').map(&:to_i)
(a..b).inject{|num ,i| num + ( c % i == 0 ? 1 : 0)}
| a, b, c = gets.split(' ').map(&:to_i)
puts (a..b).inject(0){|num ,i| num + ( c % i == 0 ? 1 : 0)}
| [
"io.output.change",
"call.add",
"call.arguments.add"
] | 181,976 | 181,977 | u731832436 | ruby |
p02398 | a, b, c = gets.split(' ').map(&:to_i)
(a..b).inject(0){|num ,i| num + ( c % i == 0 ? 1 : 0)}
| a, b, c = gets.split(' ').map(&:to_i)
puts (a..b).inject(0){|num ,i| num + ( c % i == 0 ? 1 : 0)}
| [
"io.output.change",
"call.add"
] | 181,978 | 181,977 | u731832436 | ruby |
p02399 | a,b = gets.chomp.split.map(&:to_i)
puts "#{a / b} #{a % b} #{sprintf("%f", a / b)}" | a,b = gets.chomp.split.map(&:to_i)
puts "#{a / b} #{a % b} #{sprintf("%f", a / b.to_f)}" | [
"call.arguments.change",
"io.output.change"
] | 185,476 | 185,477 | u742797815 | ruby |
p02399 | a, b = ARGF.gets.split.map(&:to_i)
d = a / b
r = a % b
f = (a / b).to_f
printf("%d %d %f\n", d, r, f) | a, b = ARGF.gets.split.map(&:to_i)
d = a / b
r = a % b
f = a.to_f / b
printf("%d %d %f\n", d, r, f) | [
"call.add",
"call.remove"
] | 185,482 | 185,483 | u102042957 | ruby |
p02399 | a,b=gets.split.map &:to_i
puts "#{a/b} #{a%b} %06f" % a.to_f/b.to_f | a,b=gets.split.map &:to_i
puts "#{a/b} #{a%b} %06f" % (a/b.to_f) | [
"call.arguments.change",
"call.remove"
] | 185,486 | 185,487 | u352522848 | ruby |
p02399 | a,b = gets.chomp.split.map(&:to_i)
d = a + b
r = a % b
f = a.to_f / b
puts "#{d} #{r}" + sprintf("%.5f", f) | a,b = gets.chomp.split.map(&:to_i)
d = a / b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change",
"literal.string.change",
"call.arguments.change"
] | 185,504 | 185,502 | u407138207 | ruby |
p02399 | a,b = gets.chomp.split.map(&:to_i)
d = a + b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | a,b = gets.chomp.split.map(&:to_i)
d = a / b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 185,506 | 185,502 | u407138207 | ruby |
p02399 | a,b = gets.chomp.split.map(&:to_i)
d = a + b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | a, b = gets.split.map(&:to_i)
d = a / b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | [
"call.remove",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 185,506 | 185,507 | u407138207 | ruby |
p02399 | a,b = gets.chomp.split.map(&:to_i)
d = a + b
r = a % b
f = a.to_f / b
puts "#{d} #{r}" + sprintf("%.5f", f) | a, b = gets.split.map(&:to_i)
d = a / b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | [
"call.remove",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change",
"literal.string.change",
"call.arguments.change"
] | 185,504 | 185,511 | u407138207 | ruby |
p02399 | a,b = gets.chomp.split.map(&:to_i)
d = a + b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | a, b = gets.split.map(&:to_i)
d = a / b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | [
"call.remove",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 185,506 | 185,511 | u407138207 | ruby |
p02399 | a,b = gets.chomp.split.map(&:to_i)
d = a + b
r = a % b
f = a.to_f / b
puts "#{d} #{r}" + sprintf("%.5f", f) | a, b = gets.split.map(&:to_i)
d = a / b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | [
"call.remove",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change",
"literal.string.change",
"call.arguments.change"
] | 185,504 | 185,528 | u407138207 | ruby |
p02399 | a,b = gets.chomp.split.map(&:to_i)
d = a + b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | a, b = gets.split.map(&:to_i)
d = a / b
r = a % b
f = a.to_f / b
puts "#{d} #{r} " + sprintf("%.5f", f) | [
"call.remove",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 185,506 | 185,528 | u407138207 | ruby |
p02399 | a, b = gets.split.map!(&:to_i)
puts("#{a/b} #{a%b} #{format("%.5f", a / b)}") | a, b = gets.split.map!(&:to_i)
puts("#{a/b} #{a%b} #{format("%.5f", a / b.to_f)}") | [
"call.arguments.change",
"io.output.change"
] | 185,531 | 185,532 | u166301467 | ruby |
p02399 | a,b=gets.split.map &:to_i
printf"%d %d %f",a/b,a%b,a/b | a,b=gets.split.map &:to_f
printf"%d %d %f",a/b,a%b,a/b | [
"assignment.value.change",
"call.arguments.change"
] | 185,535 | 185,534 | u279605379 | ruby |
p02399 | a, b = ln.split.map(&:to_i)
d = a / b
r = a % b
f = a / b.to_f
puts sprintf("%d %d %.8f", d, r, f) | a, b = gets.split.map(&:to_i)
d = a / b
r = a % b
f = a / b.to_f
puts sprintf("%d %d %.8f", d, r, f) | [
"assignment.value.change",
"identifier.change"
] | 185,555 | 185,556 | u252204578 | ruby |
p02400 | r = gets.to_f
pi = 3.14159265359
printf("6f %f",r*r*pi,2*r*pi)
| r = gets.to_f
pi = 3.14159265359
printf("%f %f",r*r*pi,2*r*pi)
| [
"literal.string.change",
"call.arguments.change"
] | 187,449 | 187,450 | u456075975 | ruby |
p02400 | include Math
r = gets.to_i
a = 2.0 * r * PI
b = 1.0 * r * r * PI
printf("%f %f\n", a, b)
| include Math
r = gets.to_f
b = 2.0 * r * PI
a = 1.0 * r * r * PI
printf("%f %f\n", a, b)
| [
"assignment.variable.change",
"identifier.change"
] | 187,451 | 187,452 | u311760265 | ruby |
p02400 |
include Math
r = gets.to_i
a = 2.0 * r * PI
b = 1.0 * r * r * PI
printf("%f %f\n", a, b)
| include Math
r = gets.to_f
b = 2.0 * r * PI
a = 1.0 * r * r * PI
printf("%f %f\n", a, b)
| [
"assignment.variable.change",
"identifier.change"
] | 187,453 | 187,452 | u311760265 | ruby |
p02400 | include Math
r = gets.to_f
a = 2.0 * r * PI
b = 1.0 * r * r * PI
printf("%f %f\n", a, b)
| include Math
r = gets.to_f
b = 2.0 * r * PI
a = 1.0 * r * r * PI
printf("%f %f\n", a, b)
| [
"assignment.variable.change",
"identifier.change"
] | 187,454 | 187,452 | u311760265 | ruby |
p02400 | r = gets.to_f
x = 3.14
printf("%f %f\n", r * r * x.to_f, (r + r) * x.to_f) | r = gets.to_f
x = Math::PI
printf("%f %f\n", r * r * x.to_f, (r + r) * x.to_f) | [
"assignment.value.change"
] | 187,460 | 187,461 | u818936038 | ruby |
p02400 | r=gets.to_i
pi=Math.acos(-1.0)
d=2*r*pi
s=r*r*pi
printf("%10.10f %10.10f",d,s) | r=gets.to_f
pi=Math.acos(-1.0)
d=2*r*pi
s=r*r*pi
printf("%10.10f %10.10f",s,d) | [
"call.function.change",
"type_conversion.to_float.change",
"type_conversion.to_number.change",
"call.arguments.change",
"call.arguments.add"
] | 187,477 | 187,478 | u690860505 | ruby |
p02400 |
value = gets.to_f
s = 3.14 * value * value
c = 3.14 * (value * 2)
puts "#{sprintf("%.6f", s)} #{sprintf("%.6f", c)}" |
value = gets.to_f
s = Math::PI * value * value
c = Math::PI * (value * 2)
puts "#{sprintf("%.6f", s)} #{sprintf("%.6f", c)}" | [
"assignment.value.change",
"expression.operation.binary.change"
] | 187,480 | 187,481 | u046695668 | ruby |
p02400 | r = gets.chomp.to_f
printf("%.5f $.5f\n", r*r*Math::PI, r*2.0*Math::PI) | r = gets.chomp.to_f
printf("%.5f %.5f\n", r*r*Math::PI, r*2.0*Math::PI) | [
"literal.string.change",
"call.arguments.change"
] | 187,484 | 187,485 | u613519776 | ruby |
p02400 | a=gets.to_f
s=a*a*3.14159265358979
l=2*4*3.14159265358979
print sprintf("%.6f %.6f\n",s,l,) | a=gets.to_f
s=a*a*3.14159265358979
l=2*a*3.14159265358979
print sprintf("%.6f %.6f\n",s,l,) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 187,486 | 187,487 | u087542469 | ruby |
p02400 | a = gets.to_f
p = Math::PI
b = a*2*p
c = a*a*p
print sprintf( "%.6f", b )," ",sprintf( "%.6f", c ),"\n" | a = gets.to_f
p = Math::PI
b = a*2*p
c = a*a*p
print sprintf( "%.5f", c )," ",sprintf( "%.5f", b ),"\n" | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"identifier.change"
] | 187,488 | 187,489 | u746531266 | ruby |
p02400 | a = gets.to_f
p = Math::PI
b = a*2*p
c = a*a*p
print sprintf( "%.5f", b )," ",sprintf( "%.5f", c ),"\n" | a = gets.to_f
p = Math::PI
b = a*2*p
c = a*a*p
print sprintf( "%.5f", c )," ",sprintf( "%.5f", b ),"\n" | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 187,490 | 187,489 | u746531266 | ruby |
p02400 | r = gets.to_f
puts "#{ r * r * 3.14 } #{ r * 2 * 3.14 }" | r = gets.to_f
puts "#{ r * r * Math::PI } #{ r * 2 * Math::PI }" | [
"literal.string.change",
"call.arguments.change"
] | 190,696 | 190,697 | u569541270 | ruby |
p02400 | include Math
r = gets.to_i
printf("%f %f\n", 2 * r * PI,r * r * PI) | include Math
r = gets.to_f
printf("%f %f\n", r * r * PI,2 * r * PI) | [
"call.function.change",
"type_conversion.to_float.change",
"type_conversion.to_number.change",
"call.arguments.change",
"call.arguments.add"
] | 190,700 | 190,699 | u569541270 | ruby |
p02400 | r = gets.chomp.to_i
sprintf("%f %f\n",r*r*Math::PI, r*2*Math::PI) | r = gets.chomp.to_f
printf("%f %f\n",r*r*Math::PI, r*2*Math::PI) | [] | 190,702 | 190,703 | u045588362 | ruby |
p02400 | r = gets.to_d
puts("#{sprintf("%.6f", r * r * Math::PI)} #{sprintf("%.6f", 2 * r * Math::PI)}") | r = gets.to_f
puts("#{sprintf("%.6f", r * r * Math::PI)} #{sprintf("%.6f", 2 * r * Math::PI)}") | [
"assignment.value.change",
"identifier.change"
] | 190,707 | 190,705 | u750346935 | ruby |
p02400 | r = gets.to_f
p = 3.14159265
puts printf("%.6f", r * r * p) + " " + sprintf("%.6f", 2.0 * r * p) | r = gets.to_f
p = 3.14159265358979323846264338327
puts sprintf("%.6f", r * r * p) + " " + sprintf("%.6f", 2.0 * r * p) | [
"literal.number.float.change",
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 190,710 | 190,711 | u600321313 | ruby |
p02400 | r = gets.to_f
p = 3.14159265
puts sprintf("%.6f", r * r * p) + " " + sprintf("%.6f", 2.0 * r * p) | r = gets.to_f
p = 3.14159265358979323846264338327
puts sprintf("%.6f", r * r * p) + " " + sprintf("%.6f", 2.0 * r * p) | [
"literal.number.float.change",
"assignment.value.change"
] | 190,712 | 190,711 | u600321313 | ruby |
p02400 | r = gets.to_f
p = 3.141592
puts [p ** 2 * r, 2 * p * r].join ' ' | r = gets.to_f
p = Math::PI
puts [r ** 2 * p, 2 * p * r].join ' ' | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 190,713 | 190,714 | u087773362 | ruby |
p02400 | r = gets.to_f
p = 3.1415926534
puts [p ** 2 * r, 2 * p * r].join ' ' | r = gets.to_f
p = Math::PI
puts [r ** 2 * p, 2 * p * r].join ' ' | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 190,715 | 190,714 | u087773362 | ruby |
p02400 | r = gets.to_f
p = 3.1415926535897932384626433
puts [p ** 2 * r, 2 * p * r].join ' ' | r = gets.to_f
p = Math::PI
puts [r ** 2 * p, 2 * p * r].join ' ' | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 190,716 | 190,714 | u087773362 | ruby |
p02400 | r = gets.to_f
p = Math::PI
puts [p ** 2 * r, 2 * p * r].join ' ' | r = gets.to_f
p = Math::PI
puts [r ** 2 * p, 2 * p * r].join ' ' | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 190,717 | 190,714 | u087773362 | ruby |
p02400 | r = gets.to_i
n = Math::PI
l = (r * 2) * n
S = (r**2) * n
printf( "%f %f\n",l,S) | r = gets.to_f
n = Math::PI
l = (r * 2) * n
S = (r**2) * n
printf( "%f %f\n",S,l) | [
"call.function.change",
"type_conversion.to_float.change",
"type_conversion.to_number.change",
"call.arguments.change",
"call.arguments.add"
] | 190,718 | 190,719 | u219652952 | ruby |
p02400 | r = gets.to_f
n = Math::PI
l = (r * 2) * n
S = (r**2) * n
printf( "%f %f\n",l,S) | r = gets.to_f
n = Math::PI
l = (r * 2) * n
S = (r**2) * n
printf( "%f %f\n",S,l) | [
"call.arguments.change",
"call.arguments.add"
] | 190,720 | 190,719 | u219652952 | ruby |
p02400 | r = gets.to_f
puts '%.6f %.6f' % [2*r*Math::PI, r*r*Math::PI] | r = gets.to_f
puts '%.6f %.6f' % [r*r*Math::PI, 2*r*Math::PI] | [
"call.arguments.add"
] | 190,735 | 190,736 | u422350156 | ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.