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 |
|---|---|---|---|---|---|---|---|
p02382 | n = gets.to_i
x = gets.split.map(&:to_f)
y = gets.split.map(&:to_f)
p1, p2, p3 = 0, 0, 0;
max_array = []
n.times do |i|
q = x[i] - y[i]
q = q * -1 if q < 0
max_array << q
p1 += q
p2 += q ** 2
p3 += q ** 3
end
puts p1
puts Math.sqrt(p2)
puts p3 ** (1 / 3)
puts max(max_array) | n = gets.to_i
x = gets.split.map(&:to_f)
y = gets.split.map(&:to_f)
p1, p2, p3 = 0, 0, 0;
max_array = []
n.times do |i|
q = x[i] - y[i]
q = q * -1 if q < 0
max_array << q
p1 += q
p2 += q ** 2
p3 += q ** 3
end
puts p1
puts Math.sqrt(p2)
puts p3 ** Rational(1, 3)
puts max_array.max | [
"call.add",
"call.arguments.change",
"expression.operation.binary.change",
"call.remove",
"io.output.change"
] | 137,031 | 137,032 | u330842660 | ruby |
p02382 | n = gets.to_i
x = gets.split.map(&:to_f)
y = gets.split.map(&:to_f)
(1..3).each do |p|
d = 0.0
n.times do |i|
d +=((x[i] - y[i]).abs)**p
end
puts d**(1.0/p)
end
chedyshev = []
n.times do |i|
chedyshev.push (x[i] -- y[i]).abs
end
puts chedyshev.max | n = gets.to_i
x = gets.split.map(&:to_f)
y = gets.split.map(&:to_f)
(1..3).each do |p|
d = 0.0
n.times do |i|
d += ((x[i] - y[i]).abs)**p
end
puts d**(1.0/p)
end
chebyshev = []
n.times do |i|
chebyshev.push (x[i] - y[i]).abs
end
puts chebyshev.max | [
"assignment.variable.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 137,035 | 137,036 | u407138207 | ruby |
p02382 | n = gets.to_i
x = gets.split.map(&:to_f)
y = gets.split.map(&:to_f)
(1..3).each do |p|
d = 0.0
n.times do |i|
d +=((x[i] - y[i]).abs)**p
end
puts d**(1.0/p)
end
chedyshev = []
n.times do |i|
chedyshev.push (x[i] -- y[i]).abs
end
puts chedyshev.max | n = gets.to_i
x = gets.split.map(&:to_f)
y = gets.split.map(&:to_f)
(1..3).each do |p|
d = 0.0
n.times do |i|
d += ((x[i] - y[i]).abs)**p
end
puts d**(1.0/p)
end
chebyshev = []
n.times do |i|
chebyshev.push (x[i] - y[i]).abs
end
puts chebyshev.max | [
"assignment.variable.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 137,035 | 137,037 | u407138207 | ruby |
p02382 | #!/usr/bin/env ruby
def manhattan(n, x_v, y_v)
d = 0.0
for i in 0..n.to_i-1 do
d += (x_v[i].to_f - y_v[i].to_f).abs
end
d
end
def euc_i(n, x_v, y_v, p)
d = 0.0
for i in 0..n.to_i-1 do
d += (x_v[i].to_f - y_v[i].to_f).abs ** p
end
d = d ** (1/p.to_f)
end
def chebshef(n, x_v, y_v)
d = 0.0
f... | def manhattan(n, x_v, y_v)
d = 0.0
for i in 0..n.to_i-1 do
d += (x_v[i].to_f - y_v[i].to_f).abs
end
d
end
def euc_i(n, x_v, y_v, p)
d = 0.0
for i in 0..n.to_i-1 do
d += (x_v[i].to_f - y_v[i].to_f).abs ** p
end
d = d ** (1/p.to_f)
end
def chebshef(n, x_v, y_v)
d = 0.0
for i in 0..n.to_i-1 d... | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 137,038 | 137,039 | u706174455 | ruby |
p02382 | include Math
n = gets.to_i
x = gets.split.map(&:to_i)
y = gets.split.map(&:to_i)
d1 = 0
d2 = 0
d3 = 0
dc = 0
for i in 0..n-1
d = (x[i] - y[i]).abs
d1 += d
d2 += d ** 2
d3 += d ** 3
dc = d if dc < d
end
d2 = sqrt(d2)
d3 = d3 ** 1.0 / 3.0
printf "%f\n", d1
printf "%f\n", d2
printf "%f\n", d3
printf "%f\n", d4
| include Math
n = gets.to_i
x = gets.split.map(&:to_i)
y = gets.split.map(&:to_i)
d1 = 0
d2 = 0
d3 = 0
dc = 0
for i in 0..(n-1)
d = (x[i] - y[i]).abs
d1 += d
d2 += d ** 2
d3 += d ** 3
dc = d if dc < d
end
d2 = sqrt(d2)
d3 = d3 ** (1.0/3.0)
printf "%f\n", d1
printf "%f\n", d2
printf "%f\n", d3
printf "%f\n", d... | [
"identifier.change",
"call.arguments.change"
] | 137,047 | 137,048 | u087014397 | ruby |
p02383 | class Dice
attr_accessor :faces #メンバ変数を外部から参照可能に dice.faces
def initialize(arr)
@faces = arr
end
def roll(direction)
case direction
when "N"
tmp = @faces[0]
@faces[0] = @faces[1]
@faces[1] = @faces[5]
@faces[4] = @faces[5]
@faces[5] = tmp
when "S"
tmp = @face... | class Dice
attr_accessor :faces #メンバ変数を外部から参照可能に dice.faces
def initialize(arr)
@faces = arr
end
def roll(direction)
case direction
when "N"
tmp = @faces[0]
@faces[0] = @faces[1]
@faces[1] = @faces[5]
@faces[5] = @faces[4]
@faces[4] = tmp
when "S"
tmp = @face... | [
"assignment.remove",
"assignment.add"
] | 137,419 | 137,420 | u728700495 | ruby |
p02383 | <<NOTE.!
サイコロ I
次の展開図から得られるサイコロを転がすシミュレーションを行うプログラムを作成してください。
サイコロの各面には図のとおりに 1 から 6 のラベルが割りあてられています。
+ http://judge.u-aizu.ac.jp/onlinejudge/IMAGE2/ITP1_11_A_1.png
+ http://judge.u-aizu.ac.jp/onlinejudge/IMAGE2/ITP1_11_A_2.png
入力としてサイコロの各面のラベルに対応する数字と、転がす命令の列が与えられるので、サイコロの上面の数字を出力してください。シミュレーションの初期状態は、図のとお... | <<NOTE.!
サイコロ I
次の展開図から得られるサイコロを転がすシミュレーションを行うプログラムを作成してください。
サイコロの各面には図のとおりに 1 から 6 のラベルが割りあてられています。
+ http://judge.u-aizu.ac.jp/onlinejudge/IMAGE2/ITP1_11_A_1.png
+ http://judge.u-aizu.ac.jp/onlinejudge/IMAGE2/ITP1_11_A_2.png
入力としてサイコロの各面のラベルに対応する数字と、転がす命令の列が与えられるので、サイコロの上面の数字を出力してください。シミュレーションの初期状態は、図のとお... | [
"call.add",
"call.remove"
] | 137,426 | 137,427 | u024069892 | ruby |
p02383 | $stdin = DATA
class Dice
def initialize
dice = gets.split.map(&:to_i)
@action = gets.chomp
@upper = dice[0]
@side = [ dice[4], dice[2], dice[1], dice[3] ]
@bottom = dice[5]
end
def print_upper
@action.chars do |str|
b = @bottom
u = @upper
case str
when "N"
... | class Dice
def initialize
dice = gets.split.map(&:to_i)
@action = gets.chomp
@upper = dice[0]
@side = [ dice[4], dice[2], dice[1], dice[3] ]
@bottom = dice[5]
end
def print_upper
@action.chars do |str|
b = @bottom
u = @upper
case str
when "N"
@upper ... | [
"assignment.remove"
] | 137,428 | 137,429 | u330842660 | ruby |
p02383 | class Dice
attr_reader :upper_number
def initialize(numbers)
@numbers = numbers.unshift 0
@upper_number = numbers[0]
end
def rotate(instruction)
instruction.split('').each{|op|
case op
when 'W'
tmp = @numbers[1]
@numbers[1]=@numbers[3]; @numbers[3]=@numbers[6]; @numbers[6]=@numbers[4]; @number... | class Dice
attr_reader :upper_number
def initialize(numbers)
@numbers = numbers.unshift 0
@upper_number = numbers[0]
end
def rotate(instruction)
instruction.split('').each{|op|
case op
when 'W'
tmp = @numbers[1]
@numbers[1]=@numbers[3]; @numbers[3]=@numbers[6]; @numbers[6]=@numbers[4]; @number... | [
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 137,430 | 137,431 | u861698758 | ruby |
p02383 | class Dice
def initialize(lbl)
@lbl = lbl
end
def W
Dice.new(*[2,1,5,0,4,3].map{|x| @lbl[x]})
end
def E
Dice.new(*[3,1,0,5,4,2].map{|x| @lbl[x]})
end
def N
Dice.new(*[1,5,2,3,0,4].map{|x| @lbl[x]})
end
def S
Dice.new(*[4,0,2,3,5,1].map{|x| @lbl[x]})
end
[:top, :front, :right,... | class Dice
def initialize(*lbl)
@lbl = lbl
end
def W
Dice.new(*[2,1,5,0,4,3].map{|x| @lbl[x]})
end
def E
Dice.new(*[3,1,0,5,4,2].map{|x| @lbl[x]})
end
def N
Dice.new(*[1,5,2,3,0,4].map{|x| @lbl[x]})
end
def S
Dice.new(*[4,0,2,3,5,1].map{|x| @lbl[x]})
end
[:top, :front, :right... | [
"literal.string.change",
"call.arguments.change"
] | 137,434 | 137,435 | u714639016 | ruby |
p02383 | class Dice
def initialize(*lbl)
@lbl = lbl
end
def W
Dice.new(*[2,1,5,0,4,3].map{|x| @lbl[x]})
end
def E
Dice.new(*[3,1,0,5,4,2].map{|x| @lbl[x]})
end
def N
Dice.new(*[1,5,2,3,0,4].map{|x| @lbl[x]})
end
def S
Dice.new(*[4,0,2,3,5,1].map{|x| @lbl[x]})
end
[:top, :front, :right... | class Dice
def initialize(*lbl)
@lbl = lbl
end
def W
Dice.new(*[2,1,5,0,4,3].map{|x| @lbl[x]})
end
def E
Dice.new(*[3,1,0,5,4,2].map{|x| @lbl[x]})
end
def N
Dice.new(*[1,5,2,3,0,4].map{|x| @lbl[x]})
end
def S
Dice.new(*[4,0,2,3,5,1].map{|x| @lbl[x]})
end
[:top, :front, :right... | [
"literal.string.change",
"call.arguments.change"
] | 137,436 | 137,435 | u714639016 | ruby |
p02383 | class Dice
def initialize (given_ary)
@ary = given_ary
end
def roll (direction)
case direction.downcase
when "e"
tmp = @ary[0]
@ary[0] = @ary[3]
@ary[3] = @ary[5]
@ary[5] = @ary[2]
@ary[2] =tmp
when "w"
tmp = @ary[0]
@ary[0] = @ary[2]
@ary[2] = @ar... | class Dice
def initialize (given_ary)
@ary = given_ary
end
def roll (direction)
case direction.downcase
when "e"
tmp = @ary[0]
@ary[0] = @ary[3]
@ary[3] = @ary[5]
@ary[5] = @ary[2]
@ary[2] = tmp
when "w"
tmp = @ary[0]
@ary[0] = @ary[2]
@ary[2] = @a... | [] | 137,442 | 137,440 | u407138207 | ruby |
p02383 | class Dice
def initialize (given_ary)
@ary = given_ary
end
def roll (direction)
case direction.downcase
when "e"
tmp = @ary[0]
@ary[0] = @ary[3]
@ary[3] = @ary[5]
@ary[5] = @ary[2]
@ary[2] =tmp
when "w"
tmp = @ary[0]
@ary[0] = @ary[2]
@ary[2] = @ar... | class Dice
def initialize (given_ary)
@ary = given_ary
end
def roll (direction)
case direction.downcase
when "e"
tmp = @ary[0]
@ary[0] = @ary[3]
@ary[3] = @ary[5]
@ary[5] = @ary[2]
@ary[2] = tmp
when "w"
tmp = @ary[0]
@ary[0] = @ary[2]
@ary[2] = @a... | [] | 137,443 | 137,440 | u407138207 | ruby |
p02383 | class Dice
def initialize (given_ary)
@ary = given_ary
end
def roll (direction)
case direction.downcase
when "e"
tmp = @ary[0]
@ary[0] = @ary[3]
@ary[3] = @ary[5]
@ary[5] = @ary[2]
@ary[2] = tmp
when "w"
tmp = @ary[0]
@ary[0] = @ary[2]
@ary[2] = @a... | class Dice
def initialize (given_ary)
@ary = given_ary
end
def roll (direction)
case direction.downcase
when "e"
tmp = @ary[0]
@ary[0] = @ary[3]
@ary[3] = @ary[5]
@ary[5] = @ary[2]
@ary[2] = tmp
when "w"
tmp = @ary[0]
@ary[0] = @ary[2]
@ary[2] = @a... | [] | 137,444 | 137,440 | u407138207 | ruby |
p02383 | class Dice
attr_reader :surface
def initialize arr
@surface = arr
end
def rotate d
tmp = @surface.clone
case d
when 'N'
tmp[0]=@surface[1];tmp[1]=@surface[5];tmp[5]=@surface[4];tmp[4]=@surface[0]
when 'S'
tmp[0]=@surface[4];tmp[1]=@surface[0];tmp[5]=@surface[1];tmp[4]=@surface[5]
when 'W'
tmp[3... | class Dice
attr_reader :surface
def initialize arr
@surface = arr
end
def rotate d
tmp = @surface.clone
case d
when 'N'
tmp[0]=@surface[1];tmp[1]=@surface[5];tmp[5]=@surface[4];tmp[4]=@surface[0]
when 'S'
tmp[0]=@surface[4];tmp[1]=@surface[0];tmp[5]=@surface[1];tmp[4]=@surface[5]
when 'W'
tmp[3... | [
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"assignment.variable.change"
] | 137,445 | 137,446 | u712035986 | ruby |
p02383 | surface = gets.split.map(&:to_i)
commands = gets.chomp.char.map(&:to_sym)
throw = {E: [3, 2, 6, 1, 5, 4], N: [5, 1, 3, 4, 6, 2],
S: [2, 6, 3, 4, 1, 5], W: [4, 2, 1, 6, 5, 3]}
th = {}
throw.each_key {|k| th[k] = throw[k].map(&:pred)}
dice = [*0..5]
commands.each do |c|
next_dice = Array.new(6, 0)
dice.each... | surface = gets.split.map(&:to_i)
commands = gets.chomp.chars.map(&:to_sym)
throw = {E: [3, 2, 6, 1, 5, 4], N: [5, 1, 3, 4, 6, 2],
S: [2, 6, 3, 4, 1, 5], W: [4, 2, 1, 6, 5, 3]}
th = {}
throw.each_key do |k|
th[k] = throw[k].map(&:pred)
end
dice = [*0..5]
commands.each do |c|
next_dice = Array.new(6, 0)
d... | [
"assignment.value.change",
"identifier.change"
] | 137,451 | 137,452 | u864617427 | ruby |
p02384 | #!/usr/bin/env ruby
result = []
dice = gets.split.map(&:to_i)
loop_number = gets.to_i
loop_number.times do |index|
face = gets.split.map(&:to_i)
case face[0]
when dice[0] then
case face[1]
when dice[1] then
result << dice[2]
when dice[2] then
result << dice[4... | #!/usr/bin/env ruby
result = []
dice = gets.split.map(&:to_i)
loop_number = gets.to_i
loop_number.times do |index|
face = gets.split.map(&:to_i)
case face[0]
when dice[0] then
case face[1]
when dice[1] then
result << dice[2]
when dice[2] then
result << dice[4... | [
"literal.number.integer.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 137,553 | 137,554 | u948491783 | ruby |
p02384 | #!/usr/bin/env ruby
result = []
dice = gets.split.map(&:to_i)
loop_number = gets.to_i
loop_number.times do |index|
face = gets.split.map(&:to_i)
case face[0]
when dice[0] then
case face[1]
when dice[1] then
result << dice[2]
when dice[2] then
result << dice[4... | #!/usr/bin/env ruby
result = []
dice = gets.split.map(&:to_i)
loop_number = gets.to_i
loop_number.times do |index|
face = gets.split.map(&:to_i)
case face[0]
when dice[0] then
case face[1]
when dice[1] then
result << dice[2]
when dice[2] then
result << dice[4... | [
"call.remove"
] | 137,555 | 137,554 | u948491783 | ruby |
p02384 | #!/usr/bin/env ruby
# vim:set fileencoding=utf-8:
class Dice
def initialize( given_ary )
@ary = given_ary
end
def topface( val )
4.times do
self.roll( "E" )
if self.top == val
return
end
end
2.times do
self.roll( "N" )
if self.top == val
return
... | #!/usr/bin/env ruby
# vim:set fileencoding=utf-8:
class Dice
def initialize( given_ary )
@ary = given_ary
end
def topface( val )
4.times do
self.roll( "E" )
if self.top == val
return
end
end
3.times do
self.roll( "N" )
if self.top == val
return
... | [
"literal.number.integer.change"
] | 137,558 | 137,559 | u216457386 | ruby |
p02384 | class Dice
@numbers = []
def initialize numbers
@numbers = numbers
end
def roll direction
old = @numbers.dup
case direction
when "N"
@numbers[0] = old[1]
@numbers[1] = old[5]
@numbers[5] = old[4]
@numbers[4] = old[0]
... | class Dice
@numbers = []
def initialize numbers
@numbers = numbers
end
def roll direction
old = @numbers.dup
case direction
when "N"
@numbers[0] = old[1]
@numbers[1] = old[5]
@numbers[5] = old[4]
@numbers[4] = old[0]
... | [
"identifier.change"
] | 137,561 | 137,562 | u247371045 | ruby |
p02385 | class Dice
TOP=0
FRONT=1
RIGHT=2
LEFT=3
BACK=4
BOTTOM=5
def initialize( nums )
@face = nums
end
def rolltoTopIndex( faceindex )
case faceindex
when FRONT
roll( "N" )
when RIGHT
roll( "W" )
when LEFT
roll( "E" )
when BACK
roll( "S" )
when BOTTOM
roll( "NN" )
when TOP
end
en... | class Dice
TOP=0
FRONT=1
RIGHT=2
LEFT=3
BACK=4
BOTTOM=5
def initialize( nums )
@face = nums
end
def rolltoTopIndex( faceindex )
case faceindex
when FRONT
roll( "N" )
when RIGHT
roll( "W" )
when LEFT
roll( "E" )
when BACK
roll( "S" )
when BOTTOM
roll( "NN" )
when TOP
end
en... | [] | 138,096 | 138,097 | u604774382 | ruby |
p02385 | class Dice
def initialize(given_ary)
@ary = given_ary
end
def topface(val)
4.times do
self.roll ("E")
if self.top == val
return
end
end
3.times do
self.roll("N")
if self.top == val
return
end
end
end
def frontface(val)
4.times do
... | class Dice
def initialize( given_ary )
@ary = given_ary
end
def topface( val )
4.times do
self.roll( "E" )
if self.top == val
return
end
end
3.times do
self.roll( "N" )
if self.top == val
return
end
end
end
def frontface( val )
4.t... | [
"expression.operation.binary.change",
"call.arguments.change"
] | 138,106 | 138,107 | u407138207 | ruby |
p02385 | class Dice
attr_accessor :status
def initialize(status)
@status = status
end
def compareSpec(dice)
@d2 = dice.status
d1 = matchDirect(@d2)
return (d1 == @d2) ? true : false
end
def matchDirect(d2)
dt = Array.new(6)
2.times do |i|
idx = detectIndex(i)
dt[i] = @status[idx... | class Dice
attr_accessor :status
def initialize(status)
@status = status
end
def compareSpec(dice)
@d2 = dice.status
d1 = matchDirect(@d2)
return (d1 == @d2) ? true : false
end
def matchDirect(d2)
dt = Array.new(6)
2.times do |i|
idx = detectIndex(i)
dt[i] = @status[idx... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"function.return_value.change"
] | 138,119 | 138,120 | u213421924 | ruby |
p02386 | class Dice
def initialize()
# top bottom N E S W
@number = gets.split.map(&:to_i)
@dice_number = [1, 6, 5, 3, 2, 4]
end
def rotate(command)
swap_number = []
case command
when 'N'
swap_number = [2, 1, 4]
swap(swap_number)
when 'E'
swap_number = [3, 1, 5]
swap(swap_number)
when 'S'
sw... | class Dice
def initialize()
# top bottom N E S W
@number = gets.split.map(&:to_i)
@dice_number = [1, 6, 5, 3, 2, 4]
end
def rotate(command)
swap_number = []
case command
when 'N'
swap_number = [2, 1, 4]
swap(swap_number)
when 'E'
swap_number = [3, 1, 5]
swap(swap_number)
when 'S'
sw... | [
"call.remove"
] | 138,791 | 138,789 | u873778695 | ruby |
p02386 | class Dice
@north = 5
@south = 2
@east = 3
@west = 4
@top = 1
@bottom = 6
def initialize(input_t, input_s, input_e, input_w, input_n, input_b)
@north = input_n
@south = input_s
@east = input_e
@west = input_w
@top = input_t
@bottom = input_b
end
def set(north, south, east, we... | class Dice
@north = 5
@south = 2
@east = 3
@west = 4
@top = 1
@bottom = 6
def initialize(input_t, input_s, input_e, input_w, input_n, input_b)
@north = input_n
@south = input_s
@east = input_e
@west = input_w
@top = input_t
@bottom = input_b
end
def set(north, south, east, we... | [
"literal.number.integer.change"
] | 138,792 | 138,793 | u723368439 | ruby |
p02388 | x = ARGV[0].to_i
puts x ** 3 | x = ARGF.gets().to_i
puts x**3 | [
"call.arguments.change"
] | 142,629 | 142,630 | u024069892 | ruby |
p02388 | x = ARGV[0].to_i
p x ** 3 | x = ARGF.gets().to_i
puts x**3 | [
"call.arguments.change",
"call.function.change",
"io.output.change"
] | 142,631 | 142,630 | u024069892 | ruby |
p02388 | p gets.to_i ^ 3 | p gets.to_i ** 3 | [
"call.arguments.change",
"expression.operation.binary.change"
] | 142,652 | 142,653 | u334460795 | ruby |
p02388 | p gets.to_i ^ 3 |
x = gets.to_i
puts x ** 3 | [
"assignment.variable.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 142,652 | 142,654 | u334460795 | ruby |
p02388 | # -*- coding: utf-8 -*-
a = get.chomp.to_i
b = a * a * a
puts b | # -*- coding: utf-8 -*-
a = gets.chomp.to_i
b = a * a * a
puts b | [
"assignment.value.change",
"identifier.change"
] | 142,655 | 142,656 | u571404136 | ruby |
p02388 | int = gets.to_
puts "#{int} ** 3" | int = gets.to_i
puts "#{int ** 3}" | [
"assignment.value.change",
"identifier.change",
"literal.string.change",
"call.arguments.change"
] | 142,659 | 142,660 | u046695668 | ruby |
p02388 | #!/usr/local/bin/ruby
x=gets.chomp.to_i
y=x*x*x
STDERR.print("%d\n",y) | #!/usr/local/bin/ruby
x=gets.chomp.to_i
y=x*x*x
printf("%d\n",y) | [
"call.remove"
] | 142,666 | 142,667 | u248712727 | ruby |
p02388 | x=gets.chomp
puts x**3 | x = gets.chomp.to_i
puts x ** 3 | [
"call.add"
] | 142,673 | 142,674 | u695662752 | ruby |
p02388 | x=gets.chomp
puts x.to_i **3 | x = gets.chomp.to_i
puts x ** 3 | [
"call.remove",
"call.add"
] | 142,675 | 142,674 | u695662752 | ruby |
p02388 | puts ARGV[0].to_i ** 3 | puts STDIN.gets.chomp.to_i ** 3 | [
"call.add",
"call.arguments.change"
] | 142,678 | 142,679 | u217758765 | ruby |
p02388 | num = gets
int x
x = num.to_i
print x ** 3 | n = gets
x = n.to_i
puts x ** 3 | [
"assignment.variable.change",
"identifier.change",
"call.remove",
"assignment.value.change"
] | 142,680 | 142,681 | u529723140 | ruby |
p02388 | a = gets
puts a*a*a | a = gets.to_i
puts a**3 | [
"call.add",
"expression.operation.binary.remove"
] | 142,689 | 142,690 | u944058699 | ruby |
p02388 | puts(gets.chomp.to_i ** 2) | puts(gets.to_i ** 3) | [
"call.remove",
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 142,709 | 142,710 | u750346935 | ruby |
p02388 | num = ARGV[0].to_i
puts(num ** 3) | num = gets.to_i
puts(num ** 3) | [
"assignment.value.change"
] | 142,731 | 142,732 | u404374904 | ruby |
p02388 | A = gets.freeze
puts A * A * A | A = gets.to_i.freeze
puts A * A * A | [
"call.add"
] | 142,738 | 142,739 | u556326323 | ruby |
p02388 | gets.to_i**3 | puts gets.to_i**3 | [
"io.output.change",
"call.add"
] | 142,746 | 142,747 | u014788538 | ruby |
p02388 | n = gets
puts n*n*n | n = gets.to_i
puts n*n*n | [
"call.add"
] | 142,764 | 142,765 | u203261375 | ruby |
p02388 | x= gets.chomp
y=x*x*x
puts y | x= gets.chomp.to_i
y=x*x*x
puts y | [
"call.add"
] | 142,766 | 142,767 | u971905595 | ruby |
p02388 | x= gets
y=x*x*x
puts y | x= gets.chomp.to_i
y=x*x*x
puts y | [
"call.add"
] | 142,768 | 142,767 | u971905595 | ruby |
p02388 | a = gets
p a.chomp.to_i*3 | a = gets
p a.chomp.to_i**3 | [
"call.arguments.change"
] | 142,775 | 142,776 | u656368260 | ruby |
p02388 | a = gets
puts a.chomp.to_i*3 | a = gets
p a.chomp.to_i**3 | [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 142,777 | 142,776 | u656368260 | ruby |
p02388 | a = gets
puts a.to_i*3 | a = gets
p a.chomp.to_i**3 | [
"identifier.change",
"call.add",
"call.arguments.change",
"io.output.change"
] | 142,778 | 142,776 | u656368260 | ruby |
p02388 | x =gets.to_i
puts x ** 2 | x = gets.to_i
y = x ** 3
puts y | [
"assignment.variable.change",
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"call.add"
] | 142,781 | 142,787 | u407138207 | ruby |
p02388 | x =gets.to_i
x = x ** 2
puts x | x = gets.to_i
y = x ** 3
puts y | [
"assignment.variable.change",
"identifier.change",
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"call.arguments.change"
] | 142,783 | 142,787 | u407138207 | ruby |
p02388 | x = gets.to_i
y = x ** 2
puts y | x = gets.to_i
y = x ** 3
puts y | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 142,784 | 142,787 | u407138207 | ruby |
p02388 | x =gets.to_i
x = x ** 2
puts x | x = gets.to_i
y = (x **3)
puts y | [
"assignment.variable.change",
"identifier.change",
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"call.arguments.change"
] | 142,783 | 142,790 | u407138207 | ruby |
p02388 | x = gets.to_i
y = x ** 2
puts y | x = gets.to_i
y = (x **3)
puts y | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 142,784 | 142,790 | u407138207 | ruby |
p02388 | x =gets.to_i
x = x ** 2
puts x | x = gets.to_i
y = (x ** 3)
puts y | [
"assignment.variable.change",
"identifier.change",
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"call.arguments.change"
] | 142,783 | 142,791 | u407138207 | ruby |
p02388 | x = gets.to_i
y = x ** 2
puts y | x = gets.to_i
y = (x ** 3)
puts y | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 142,784 | 142,791 | u407138207 | ruby |
p02388 | x =gets.to_i
puts x ** 2 | x = gets.to_i
y = x **3
puts y | [
"assignment.variable.change",
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"call.add"
] | 142,781 | 142,792 | u407138207 | ruby |
p02388 | x =gets.to_i
x = x ** 2
puts x | x = gets.to_i
y = x **3
puts y | [
"assignment.variable.change",
"identifier.change",
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"call.arguments.change"
] | 142,783 | 142,792 | u407138207 | ruby |
p02388 | x = gets.to_i
y = x ** 2
puts y | x = gets.to_i
y = x **3
puts y | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 142,784 | 142,792 | u407138207 | ruby |
p02388 | x = gets.to_i
puts x ** 2 | x = gets.to_i
y = x **3
puts y | [
"assignment.variable.change",
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"call.add"
] | 142,785 | 142,792 | u407138207 | ruby |
p02388 | x =gets.to_i
x = x ** 2
puts x | x = gets.to_i
y = x**3
puts y | [
"assignment.variable.change",
"identifier.change",
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"call.arguments.change"
] | 142,783 | 142,793 | u407138207 | ruby |
p02388 | x = gets.to_i
y = x ** 2
puts y | x = gets.to_i
y = x**3
puts y | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 142,784 | 142,793 | u407138207 | ruby |
p02388 | x = gets.to_i
puts x ** 2 | x = gets.to_i
y = x**3
puts y | [
"assignment.variable.change",
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"call.add"
] | 142,785 | 142,793 | u407138207 | ruby |
p02388 | n=gets
p n**3 | n=gets.to_i
p n**3 | [
"call.add"
] | 142,796 | 142,797 | u072398496 | ruby |
p02388 | a = gets.to_i
def b = a*a*a
print(b) | a = gets.to_i
x = a*a*a
puts x | [
"assignment.variable.change",
"call.arguments.change"
] | 142,968 | 142,969 | u932376477 | ruby |
p02388 | input = gets
data = input * input * input
puts data | input = gets.to_i
data = input * input * input
puts data | [
"call.add"
] | 142,973 | 142,974 | u280655990 | ruby |
p02388 | num = STDIN.gets().to_i
return num ** 3 | num = $stdin.gets.to_i
puts num ** 3 | [
"assignment.value.change",
"call.add",
"call.arguments.change",
"function.return_value.change"
] | 142,979 | 142,980 | u838759969 | ruby |
p02388 | X=gets.to_i
putss "#{x**3}" | x=gets.to_i
puts "#{x**3}" | [
"assignment.variable.change",
"identifier.change"
] | 142,983 | 142,984 | u572049600 | ruby |
p02388 | nput = gets.to_i
puts(input**3) | input = gets.to_i
puts(input**3) | [
"assignment.variable.change",
"identifier.change"
] | 142,990 | 142,991 | u737594828 | ruby |
p02388 | a = gets.to_i
b = a ** 3
print b
print | a = gets.to_i
b = a ** 3
puts b | [
"identifier.change",
"io.output.change",
"call.remove"
] | 142,995 | 142,993 | u503263570 | ruby |
p02388 | input = gets.chomp
puts input * input * input | input = gets.to_i
puts input * input * input | [
"assignment.value.change",
"identifier.change"
] | 142,996 | 142,997 | u401720175 | ruby |
p02388 | STDIN.gets.to_i ** 3 | puts (STDIN.gets.to_i ** 3) | [
"call.add",
"call.arguments.change"
] | 142,998 | 142,999 | u345868749 | ruby |
p02388 | puts ints.to_i**3
| puts gets.to_i**3
| [
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 143,004 | 143,005 | u377255272 | ruby |
p02388 | p = gets.to_i
puts p
| p = gets.to_i
puts (p * p * p)
| [
"call.arguments.change"
] | 143,006 | 143,007 | u288334335 | ruby |
p02388 | p gets.to_x**3
| puts (gets().to_i**3)
| [
"call.function.change",
"io.output.change",
"call.arguments.change",
"call.add",
"identifier.change"
] | 143,008 | 143,009 | u087014397 | ruby |
p02388 | x = get.to_i
p x ** 3
| x = gets.to_i
p x ** 3
| [
"assignment.value.change",
"identifier.change"
] | 143,014 | 143,015 | u450608799 | ruby |
p02388 | input = gets
p input ** 3
| input = gets
p (input.to_i ** 3)
| [
"call.arguments.change",
"call.add"
] | 143,024 | 143,025 | u376781570 | ruby |
p02388 | input = gets.to_i ** 3
| input = gets.to_i
puts input ** 3
| [
"call.add"
] | 143,028 | 143,029 | u061908535 | ruby |
p02388 | input = gets.to_i
puts "input ** 3"
| input = gets.to_i
puts input ** 3
| [] | 143,031 | 143,029 | u061908535 | ruby |
p02388 | input = gets.to_i
puts "input" ** 3
| input = gets.to_i
puts input ** 3
| [
"call.arguments.change"
] | 143,032 | 143,029 | u061908535 | ruby |
p02388 | input = gets.chomp
puts input**3 | input = gets.chomp
puts input.to_i**3 | [
"call.add"
] | 143,035 | 143,036 | u441419639 | ruby |
p02388 | input = gets.chomp
puts input**3 | input = gets.chomp.to_i
puts input**3 | [
"call.add"
] | 143,035 | 143,037 | u441419639 | ruby |
p02388 | x = STDIN.gets()
puts x * x * x | x = STDIN.gets().to_i
puts x * x * x | [
"call.add"
] | 143,040 | 143,041 | u523886269 | ruby |
p02388 | x = gets.to_i
x**3 | x = gets.chomp.to_i
puts x**3 | [
"call.add",
"io.output.change"
] | 143,042 | 143,043 | u518105713 | ruby |
p02389 | class Main
str = gets
str = str.split(" ")
a = str[0].to_i
b = str[1],to_i
puts "#{a*b} #{(a+b) * 2}"
end
| class Main
str = gets.to_s
str = str.split(" ")
a = str[0].to_i
b = str[1].to_i
puts "#{a*b} #{(a+b) * 2}"
end
| [
"call.add",
"assignment.value.change"
] | 147,868 | 147,869 | u973197167 | ruby |
p02389 |
input = gets.chomp.split(" ")
length = input[0].to_i
width = input[1].to_i
answer1 = length * width
answer2 = length * 2 + width * 2
puts "#{answer1},#{answer2}"
|
input = gets.chomp.split(" ")
length = input[0].to_i
width = input[1].to_i
answer1 = length * width
answer2 = length * 2 + width * 2
puts "#{answer1} #{answer2}"
| [
"literal.string.change",
"call.arguments.change"
] | 147,871 | 147,872 | u864395740 | ruby |
p02389 | input = gets.chomp.split(" ")
length = input[0].to_i
width = input[1].to_i
answer1 = length * width
answer2 = length * 2 + width * 2
puts "#{answer1}#{answer2}"
|
input = gets.chomp.split(" ")
length = input[0].to_i
width = input[1].to_i
answer1 = length * width
answer2 = length * 2 + width * 2
puts "#{answer1} #{answer2}"
| [
"literal.string.change",
"call.arguments.change"
] | 147,874 | 147,872 | u864395740 | ruby |
p02389 |
input = gets.chomp.split(" ")
length = input[0].to_i
width = input[1].to_i
answer1 = length * width
answer2 = length * 2 + width * 2
puts "#{answer1}""#{answer2}"
|
input = gets.chomp.split(" ")
length = input[0].to_i
width = input[1].to_i
answer1 = length * width
answer2 = length * 2 + width * 2
puts "#{answer1} #{answer2}"
| [
"literal.string.change",
"call.arguments.change"
] | 147,875 | 147,872 | u864395740 | ruby |
p02389 | AS,as = gets.split.map &:to_i
puts "#{AS*as} #{(AS+as)*3}"
| AS,as = gets.split.map &:to_i
puts "#{AS*as} #{(AS+as)*2}"
| [
"literal.string.change",
"call.arguments.change"
] | 147,876 | 147,877 | u075360907 | ruby |
p02389 | a, b = gets.split(" ").map(&:to_i)
puts "#{a * b} #{a + b}"
| a, b = gets.split(" ").map(&:to_i)
puts "#{a * b} #{(a + b) * 2}"
| [
"literal.string.change",
"call.arguments.change"
] | 147,878 | 147,879 | u375793841 | ruby |
p02389 | x = gets.split(" ")
a = x[0].to_i * x[1].to_i
b = (x[1].to_i*2) + (x[1].to_i*2)
puts "#{a} #{b}" | x = gets.split(" ")
a = (x[0].to_i) * (x[1].to_i)
b = (x[0].to_i*2) + (x[1].to_i*2)
puts "#{a} #{b}" | [
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 147,888 | 147,889 | u330842660 | ruby |
p02389 | x = gets.split(" ")
a = (x[0].to_i) * (x[1].to_i)
b = (x[1].to_i*2) + (x[1].to_i*2)
puts "#{a} #{b}" | x = gets.split(" ")
a = (x[0].to_i) * (x[1].to_i)
b = (x[0].to_i*2) + (x[1].to_i*2)
puts "#{a} #{b}" | [
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 147,890 | 147,889 | u330842660 | ruby |
p02389 | a=gets.to_s
b=a.sprit
x=b[0].to_i*b[1].to_i
y=2*(b[0].to_i+b[1].to_i)
print x," ",y,"\n" | a=gets.to_s
b=a.split
x=b[0].to_i*b[1].to_i
y=2*b[0].to_i+2*b[1].to_i
print x," ",y,"\n" | [
"assignment.value.change",
"identifier.change"
] | 147,900 | 147,901 | u180931985 | ruby |
p02389 | a=gets.to_s
b=a.sprit
x=b[0].to_i*b[1].to_i
y=2*b[0].to_i+2*b[1].to_i
print x," ",y,"\n" | a=gets.to_s
b=a.split
x=b[0].to_i*b[1].to_i
y=2*b[0].to_i+2*b[1].to_i
print x," ",y,"\n" | [
"assignment.value.change",
"identifier.change"
] | 147,902 | 147,901 | u180931985 | ruby |
p02389 | a=gets.to_s
b=a.sprit
x=b[0].to_i*b[1].to_i
y=2*b[0].to_i+2*b[1].to_i
print x," ",y | a=gets.to_s
b=a.split
x=b[0].to_i*b[1].to_i
y=2*b[0].to_i+2*b[1].to_i
print x," ",y,"\n" | [
"assignment.value.change",
"identifier.change",
"call.arguments.add"
] | 147,904 | 147,901 | u180931985 | ruby |
p02389 | a = gets.chomp
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i*b[1].to_i)*2
print c,(""),d,("\n") | a = gets.chomp.to_s
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i+b[1].to_i)*2
print c,(" "),d,("\n") | [
"call.add",
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"literal.string.change"
] | 147,911 | 147,910 | u741415050 | ruby |
p02389 | a = gets.chomp
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i*b[1].to_i)*2
print c,(" "),d,("\n") | a = gets.chomp.to_s
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i+b[1].to_i)*2
print c,(" "),d,("\n") | [
"call.add",
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 147,912 | 147,910 | u741415050 | ruby |
p02389 | a = gets.chomp.to_s
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i*b[1].to_i)*2
print c,(" "),d,("\n") | a = gets.chomp.to_s
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i+b[1].to_i)*2
print c,(" "),d,("\n") | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 147,913 | 147,910 | u741415050 | ruby |
p02389 | a = gets.chomp
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i*b[1].to_i)*2
print c,(""),d,("\n") | a = gets.to_s
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i+b[1].to_i)*2
print c,(" "),d,("\n") | [
"assignment.value.change",
"identifier.change",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"literal.string.change"
] | 147,911 | 147,915 | u741415050 | ruby |
p02389 | a = gets.chomp
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i*b[1].to_i)*2
print c,(" "),d,("\n") | a = gets.to_s
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i+b[1].to_i)*2
print c,(" "),d,("\n") | [
"assignment.value.change",
"identifier.change",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 147,912 | 147,915 | u741415050 | ruby |
p02389 | a = gets.chomp.to_s
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i*b[1].to_i)*2
print c,(" "),d,("\n") | a = gets.to_s
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i+b[1].to_i)*2
print c,(" "),d,("\n") | [
"call.remove",
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 147,913 | 147,915 | u741415050 | ruby |
p02389 | a = gets.chomp
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i*b[1].to_i)*2
print c,(""),d,("\n") |
a = gets.chomp
b = a.split(" ")
c = b[0].to_i*b[1].to_i
d = (b[0].to_i+b[1].to_i)*2
print c,(" "),d,("\n") | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"literal.string.change"
] | 147,911 | 147,916 | u741415050 | ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.