Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p03694
n = gets.to_i a = gets.split.map(&:to_i) puts a.max -a.min
n = gets.to_i a = gets.split.map(&:to_i) puts (a.max - a.min)
null
1,363,993
1,363,994
u001025229
ruby
p00000
<?php for($i=1;$i<=9;$i++){ for($j=1;$j<=9;$j++){ echo "$i"."x".$j."=".($i*$j)."?\n"; } } ?>
<?php for($i=1;$i<=9;$i++){ for($j=1;$j<=9;$j++){ echo "$i"."x".$j."=".($i*$j)."\n"; } }
[ "literal.string.change", "io.output.change", "expression.operation.binary.change" ]
771
769
u113092011
php
p00000
for($i=1;$i<=9;$i++){ for($j=1;$j<=9;$j++){ printf("%dx%d=%d".PHP_EOL,$i,$j,$i*$j); } }
<?php for($i=1;$i<=9;$i++){ for($j=1;$j<=9;$j++){ printf("%dx%d=%d".PHP_EOL,$i,$j,$i*$j); } }
[ "misc.php_tag.add" ]
777
778
u622250518
php
p00000
<?php for($a=1; $a<10; $a++){ for($b=1; $b<10; $b++){ echo $a."x".$b."=".$a*$b; } }
<?php for($a=1; $a<10; $a++){ for($b=1; $b<10; $b++){ echo $a."x".$b."=".$a*$b."\n"; } }
[ "expression.operation.binary.add" ]
779
780
u907957429
php
p00000
<?php for($a=1; $a<10; $a++){ for($b=1; $b<10; $b++){ echo $a."x".$b."=".$a*$b."&#10"; } }
<?php for($a=1; $a<10; $a++){ for($b=1; $b<10; $b++){ echo $a."x".$b."=".$a*$b."\n"; } }
[ "literal.string.change", "io.output.change", "io.output.newline.add" ]
783
780
u907957429
php
p00001
<?php $fp = fopen("php://stdin", "r"); $container=array(); $n=10; while($n>0){ $h=trim(fgets($fp)); array_push($container,$h); $n--; } sort($container); echo $container[0]."\n"; echo $container[1]."\n"; echo $container[2]."\n";
<?php $fp = fopen("php://stdin", "r"); $container=array(); $n=10; while($n>0){ $h=trim(fgets($fp)); array_push($container,$h); $n--; } rsort($container); echo $container[0]."\n"; echo $container[1]."\n"; echo $container[2]."\n";
[ "call.function.change" ]
3,312
3,313
u223011712
php
p00002
<?php fgets(STDIN); while($line=fgets(STDIN)){ $num[]=$line; } foreach($num as $ele){ $ele2=explode(" ",$ele); echo strlen($ele2[0]+$ele2[1])."\n"; }
<?php while($line=fgets(STDIN)){ $num[]=$line; } foreach($num as $ele){ $ele2=explode(" ",$ele); echo strlen($ele2[0]+$ele2[1])."\n"; }
[ "call.remove" ]
4,552
4,553
u660557702
php
p00018
<?php $a = explode(' ', fgets(STDIN) ); rsort($a); echo implode(' ',$a).PHP_EOL;
<?php $a = explode(' ', trim(fgets(STDIN)) ); rsort($a); echo implode(' ',$a).PHP_EOL;
[ "call.add", "call.arguments.change" ]
16,605
16,606
u195001007
php
p02388
<?php $x = (int)trim(fgets(STDIN)); echo $x*$x*$x+"\n"; ?>
<?php $x = (int)trim(fgets(STDIN)); echo $x*$x*$x."\n"; ?>
[ "io.output.change", "expression.operation.binary.change" ]
138,564
138,560
u627843443
php
p02388
<?php $i = trim(fgets(STDIN)); $s = $i*$i*$i; echo '$s \n'; ?>
<?php $i = trim(fgets(STDIN)); $s = $i*$i*$i; echo $s; ?>
[ "io.output.change" ]
138,591
138,590
u092829549
php
p02388
<?php $i = trim(fgets(STDIN)); $s = $i*$i*$i; echo '$s\n'; ?>
<?php $i = trim(fgets(STDIN)); $s = $i*$i*$i; echo $s; ?>
[ "io.output.change" ]
138,592
138,590
u092829549
php
p02388
<? echo php pow(trim(fgets(STDIN)), 3), PHP_EOL;
<?php echo pow(trim(fgets(STDIN)), 3), PHP_EOL;
[]
138,613
138,612
u291836200
php
p02388
<?php $line=fgets(STDIN); echo line * line; ?>
<?php $line=fgets(STDIN); echo $line * $line * $line; ?>
[ "io.output.change", "expression.operation.binary.change" ]
138,649
138,650
u547838013
php
p02388
<?php $line=fgets(STDIN); echo $line * $line; ?>
<?php $line=fgets(STDIN); echo $line * $line * $line; ?>
[ "expression.operation.binary.add" ]
138,651
138,650
u547838013
php
p02388
<?php $stdin = trim(fgets(STDIN)); $result = pow(stdin, 3); echo $result; ?>
<?php $stdin = trim(fgets(STDIN)); $result = pow($stdin, 3); echo $result; ?>
[ "assignment.value.change", "call.arguments.change" ]
138,654
138,655
u845105052
php
p02388
<?php $stdin = fgets(STDIN); $result = pow(stdin, 3); echo $result; ?>
<?php $stdin = trim(fgets(STDIN)); $result = pow($stdin, 3); echo $result; ?>
[ "call.add", "call.arguments.change", "assignment.value.change" ]
138,656
138,655
u845105052
php
p02389
<?php list($x, $y) = explode(" ", fgetc(STDIN)); $area = $x * $y; $around = ($x + $y) * 2; print($area." ".$around);
<?php list($x, $y) = explode(" ", fgets(STDIN)); $area = $x * $y; $around = ($x + $y) * 2; print($area." ".$around."\n");
[ "assignment.value.change", "call.function.change", "call.arguments.change" ]
143,734
143,735
u045588362
php
p02390
<?php $s = trim(fgets(STDIN)); $s = $s % 60; $m = ($s / 60) % 60; $h = $m / 60; echo (int)$h . ":" . (int)$m . ":" . (int)$s . "\n";
<?php $a = trim(fgets(STDIN)); $s = $a % 60; $m = ($a / 60) % 60; $h = $a / 60 / 60; echo (int)$h . ":" . (int)$m . ":" . (int)$s . "\n";
[ "assignment.variable.change", "identifier.change", "assignment.value.change", "expression.operation.binary.change", "assignment.change" ]
149,434
149,435
u053532603
php
p02390
<?php $a = trim(fgets(STDIN)); $s = $a % 60; $m = ($a / 60) % 60; $h = $m / 60; echo (int)$h . ":" . (int)$m . ":" . (int)$s . "\n";
<?php $a = trim(fgets(STDIN)); $s = $a % 60; $m = ($a / 60) % 60; $h = $a / 60 / 60; echo (int)$h . ":" . (int)$m . ":" . (int)$s . "\n";
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "assignment.change" ]
149,436
149,435
u053532603
php
p02391
<?PHP $input = explode(' ', trim(fgets(STDIN))); $a = $input[0]; $b = $input[1]; if($a < $b) echo 'a < b'; elseif($a > $b) echo 'a > b'; else echo '$a == $b';
<?PHP $input = explode(' ', trim(fgets(STDIN))); $a = $input[0]; $b = $input[1]; if($a < $b) echo 'a < b'; elseif($a > $b) echo 'a > b'; else echo 'a == b'; ?>
[ "literal.string.change", "io.output.change", "misc.php_tag.add" ]
153,385
153,386
u160160969
php
p02391
<?PHP $input = explode(' ', trim(fgets(STDIN))); $a = $input[0]; $b = $input[1]; if($a < $b) echo 'a < b'; elseif($a > $b) echo 'a > b'; else echo '$a == $b'; ?>
<?PHP $input = explode(' ', trim(fgets(STDIN))); $a = $input[0]; $b = $input[1]; if($a < $b) echo 'a < b'; elseif($a > $b) echo 'a > b'; else echo 'a == b'; ?>
[ "literal.string.change", "io.output.change" ]
153,387
153,386
u160160969
php
p02391
<?php $input_lines = trim(fgets(STDIN)); $s = explode(",", $input_lines); if($s[0] > $s[1]){ echo "a > b"; }else if($s[0] == $s[1]){ echo 'a == b'; }else{ echo 'a < b'; } echo "\n";
<?php $input_lines = trim(fgets(STDIN)); $s = explode(" ", $input_lines); if($s[0] > $s[1]){ echo "a > b"; }else if($s[0] == $s[1]){ echo 'a == b'; }else{ echo 'a < b'; } echo "\n";
[ "literal.string.change", "assignment.value.change", "call.arguments.change" ]
153,404
153,405
u626163867
php
p02391
<?php $input_lines = trim(fgets(STDIN)); $s = explode(" ", $s); if($s[0] > $s[1]){ echo "a > b"; }else if($s[0] == $s[1]){ echo 'a == b'; }else{ echo 'a < b'; } echo "\n";
<?php $input_lines = trim(fgets(STDIN)); $s = explode(" ", $input_lines); if($s[0] > $s[1]){ echo "a > b"; }else if($s[0] == $s[1]){ echo 'a == b'; }else{ echo 'a < b'; } echo "\n";
[ "assignment.value.change", "identifier.change", "call.arguments.change" ]
153,406
153,405
u626163867
php
p02391
<?php list($a, $b) = explode(" ", trim(fgets(STDIN))); if($a > $b){ echo "a > b"; }elseif ($a == $b) { echo "a = b"; }else{ echo "a < b"; } ?>
<?php list($a, $b) = explode(" ", trim(fgets(STDIN))); if($a > $b){ echo "a > b"; }elseif ($a == $b) { echo "a == b"; }else{ echo "a < b"; } ?>
[ "literal.string.change", "io.output.change" ]
153,425
153,426
u458439832
php
p02393
<?php $input = fgets(STDIN); $array = explode(" ", $input); sort($array); //echo $array[0]." ".$array[1]." ".$array[2]; echo implode(' ',$array) ?>
<?php $input = fgets(STDIN); $array = explode(" ", trim($input)); sort($array); //echo $array[0]." ".$array[1]." ".$array[2]; echo implode(' ',$array) ?>
[ "call.add", "call.arguments.change" ]
164,310
164,311
u359764315
php
p02393
<?php $input = fgets(STDIN); $array = explode(" ", $input); sort($array); //echo $array[0]." ".$array[1]." ".$array[2]; echo implode(' ',$array) ?>
<?php $input = fgets(STDIN); //echo var_dump($input); $array = explode(" ", trim($input)); //echo var_dump($array); //$array = explode(" ", $input); //echo var_dump($array); sort($array); //echo $array[0]." ".$array[1]." ".$array[2]; echo implode(' ',$array); //echo var_dump($array); ?>
[ "call.add", "call.arguments.change" ]
164,310
164,312
u359764315
php
p02393
<?php $input = fgets(STDIN); //echo var_dump($input); //$array = explode(" ", trim($input)); //echo var_dump($array); $array = explode(" ", $input); //echo var_dump($array); sort($array); //echo $array[0]." ".$array[1]." ".$array[2]; echo implode(' ',$array); ?>
<?php $input = fgets(STDIN); //echo var_dump($input); $array = explode(" ", trim($input)); //echo var_dump($array); //$array = explode(" ", $input); //echo var_dump($array); sort($array); //echo $array[0]." ".$array[1]." ".$array[2]; echo implode(' ',$array); //echo var_dump($array); ?>
[ "call.add", "call.arguments.change" ]
164,313
164,312
u359764315
php
p02393
<?php $s = trim(fgets(STDIN)); $s = explode(' ', $s); $s = asort($s); echo explode(' ', $s) . PHP_EOL; exit; ?>
<?php $s = trim(fgets(STDIN)); $s = explode(' ', $s); asort($s); echo implode(' ', $s) . PHP_EOL; exit; ?>
[ "assignment.change", "call.function.change", "io.output.change", "expression.operation.binary.change" ]
164,318
164,319
u595800182
php
p02393
<?php $s = trim(fgets(STDIN)); $s = explode(' ', $s); asort($s); echo explode(' ', $s) . PHP_EOL; exit; ?>
<?php $s = trim(fgets(STDIN)); $s = explode(' ', $s); asort($s); echo implode(' ', $s) . PHP_EOL; exit; ?>
[ "call.function.change", "io.output.change", "expression.operation.binary.change" ]
164,320
164,319
u595800182
php
p02393
<?php $s = trim(fgets(STDIN)); $s = explode(' ', $s); echo implode(' ', $s) . PHP_EOL; exit; ?>
<?php $s = trim(fgets(STDIN)); $s = explode(' ', $s); asort($s); echo implode(' ', $s) . PHP_EOL; exit; ?>
[ "call.add" ]
164,321
164,319
u595800182
php
p02394
<?php $input = trim(fgets(STDIN)); list($w,$h,$x,$y,$r)= explode(" ", $input); if(($x - $r) <= 0 || ($x + $r) <= $w || ($y - $r) <= 0 || ($y + $r) <= $h){ echo "Yes\n"; }else{ echo "No\n"; }
<?php $input = trim(fgets(STDIN)); list($w,$h,$x,$y,$r)= explode(" ", $input); if(($x - $r) >= 0 && ($x + $r) <= $w && ($y - $r) >= 0 && ($y + $r) <= $h){ echo "Yes\n"; }else{ echo "No\n"; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
168,019
168,020
u644239034
php
p02394
<?php $input = trim(fgets(STDIN)); list($w,$h,$x,$y,$r)= explode(" ", $input); if(($x - $r) >= 0 || ($x + $r) <= $w || ($y - $r) >= 0 || ($y + $r) <= $h){ echo "Yes\n"; }else{ echo "No\n"; }
<?php $input = trim(fgets(STDIN)); list($w,$h,$x,$y,$r)= explode(" ", $input); if(($x - $r) >= 0 && ($x + $r) <= $w && ($y - $r) >= 0 && ($y + $r) <= $h){ echo "Yes\n"; }else{ echo "No\n"; }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
168,022
168,020
u644239034
php
p02394
<?php $array = explode(' ', trim(fgets(STDIN))); //echo var_dump($array[4]); if ($array[1] > $array[3] + $array[4] || 0 > $array[3] - $array[4] || 0 > $array[2] - $array[4] || $array[0] > $array[2] + $array[4] ) { echo "Yes"; }else{ echo "No"; } ?>
<?php $array = explode(' ', trim(fgets(STDIN))); //echo var_dump($array[4]); if ($array[1] < $array[3] + $array[4] || 0 > $array[3] - $array[4] || 0 > $array[2] - $array[4] || $array[0] < $array[2] + $array[4] ) { echo "No"; }else{ echo "Yes"; } ?>
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change", "io.output.change" ]
168,027
168,028
u359764315
php
p02394
<?php $a=explode(' ',trim(fgets(STDIN))); if(($a[2]-$a[4]>=0)&($a[3]-$a[4]>=0)&($a[2]+$a[4]<=$a[0])&($a[3]+$a[4]<=$a[1])){echo 'No';} else{echo 'Yes';} ?>
<?php $a=explode(' ',trim(fgets(STDIN))); if(($a[2]-$a[4]>=0)&($a[3]-$a[4]>=0)&($a[2]+$a[4]<=$a[0])&($a[3]+$a[4]<=$a[1])){echo 'Yes';} else{echo 'No';} ?>
[ "literal.string.change", "io.output.change" ]
168,036
168,037
u064980217
php
p02396
<?php $data = array(); while ($line = fgets(STDIN)) { $value = rtrim($line); if ('0' === $value) break; if (10000 > (int)($value)) continue; $data[] = $value; } $i = 1; foreach ($data as $value) { printf("Case %d: %d\n", $i, $value); $i++; }
<?php $data = array(); while ($line = fgets(STDIN)) { $value = rtrim($line); if ('0' === $value) break; if (10000 < (int)($value)) continue; $data[] = $value; } $i = 1; foreach ($data as $value) { printf("Case %d: %d\n", $i, $value); $i++; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
171,308
171,309
u917268529
php
p02396
<?php for ($i = 1; $i <= 10000; $i++) { $input = trim(fgets(STDIN)); if($input == 0){ break; } echo 'Case'. $i. ': '. $input . PHP_EOL; }
<?php for ($i = 1; $i <= 10000; $i++) { $input = trim(fgets(STDIN)); if($input == 0){ break; } echo 'Case '. $i. ': '. $input .PHP_EOL; }
[ "literal.string.change", "io.output.change", "expression.operation.binary.change" ]
171,311
171,312
u073923014
php
p02396
<?php for ($i = 1; $i <= 10000; $i++) { $input = trim(fgets(STDIN)); if($input == 0){ break; } echo 'Case'. $i. ': '. $input .PHP_EOL; }
<?php for ($i = 1; $i <= 10000; $i++) { $input = trim(fgets(STDIN)); if($input == 0){ break; } echo 'Case '. $i. ': '. $input .PHP_EOL; }
[ "literal.string.change", "io.output.change", "expression.operation.binary.change" ]
171,313
171,312
u073923014
php
p02397
while(true){ $num = explode(" ",trim(fgets(STDIN))); $x = $num[0]; $y = $num[1]; if($x == 0 && $y == 0){ break; } elseif ($x < $y){ echo $x." ".$y .PHP_EOL; } else { echo $y." ".$x .PHP_EOL; } }
<?php while(true){ $num = explode(" ",trim(fgets(STDIN))); $x = $num[0]; $y = $num[1]; if($x == 0 && $y == 0){ break; } elseif ($x < $y){ echo $x." ".$y .PHP_EOL; } else { echo $y." ".$x .PHP_EOL; } }
[ "misc.php_tag.add" ]
175,980
175,981
u073923014
php
p02398
<?php $input = trim(gets(STDIN)); $list = explode(" ", $input); $a = $list[0]; $b = $list[1]; $c = $list[2]; $cnt = 0; for($i=$a; $i<=$b; $i++){ if($c % $i == 0){ $cnt++; } } echo $cnt; ?>
<?php $input = trim(fgets(STDIN)); $list = explode(" ", $input); $a = $list[0]; $b = $list[1]; $c = $list[2]; $cnt = 0; for($i=$a; $i<=$b; $i++){ if($c % $i == 0){ $cnt++; } } echo $cnt; ?>
[ "assignment.value.change", "call.function.change", "call.arguments.change" ]
178,566
178,567
u989420736
php
p02400
<?php $r = trim(fgets(STDIN)); $s = round($r * 2 * M_PI, 6); $l = round($r * $r * M_PI, 6); echo "{$s} {$l}".PHP_EOL;
<?php $r = trim(fgets(STDIN)); $s = round($r * 2 * M_PI, 6); $l = round($r * $r * M_PI, 6); echo "{$l} {$s}".PHP_EOL;
[ "literal.string.change", "io.output.change", "expression.operation.binary.change" ]
184,805
184,806
u655445612
php
p02406
<?php $stdin = preg_split('/ /', trim(fgets(STDIN))); $n = $stdin[0]; for ($i = 1; $i <= $n; $i++) { if ($i % 3 == 0) { print " {$i}"; } else { $j = $i; while ($j != 0) { if ($j % 10 == 3) { print " {$i}"; } $j /= 10; } }...
<?php $stdin = preg_split('/ /', trim(fgets(STDIN))); $n = $stdin[0]; for ($i = 1; $i <= $n; $i++) { if ($i % 3 == 0) { print " {$i}"; } else { $j = $i; while ($j != 0) { if ($j % 10 == 3) { print " {$i}"; break; } $j ...
[ "control_flow.break.add" ]
202,784
202,785
u510203245
php
p02407
<?php $n=trim(fgets(STDIN)); $a=explode('',trim(fgets(STDIN))); $o=''; for($i=$n-1;0<$i;$i--){$o.=$a[$i].' ';} print $o.$a[0]; ?>
<?php $n=trim(fgets(STDIN)); $a=explode(' ',trim(fgets(STDIN))); $o=''; for($i=$n-1;0<$i;$i--){$o.=$a[$i].' ';} echo $o,$a[0]; ?>
[ "literal.string.change", "assignment.value.change", "call.arguments.change", "misc.typo", "expression.operation.binary.change" ]
204,344
204,345
u064980217
php
p02407
<?php $n=trim(fgets(STDIN)); $a=explode('',trim(fgets(STDIN))); $o=''; for($i=$n-1;0<$i;$i--){$o.=$a[$i].' ';} echo $o,$a[0]; ?>
<?php $n=trim(fgets(STDIN)); $a=explode(' ',trim(fgets(STDIN))); $o=''; for($i=$n-1;0<$i;$i--){$o.=$a[$i].' ';} echo $o,$a[0]; ?>
[ "literal.string.change", "assignment.value.change", "call.arguments.change" ]
204,346
204,345
u064980217
php
p02409
<?php (new Main)->execute(); class Main { public function execute() { $house = new House(); $n = getInput(); for ($i = 0; $i < $n; $i++) { fscanf(STDIN, '%d %d %d %d', $b, $f, $r, $v); $house->put($b, $f, $r, $v); } $tenant = $house->merge(); ...
<?php (new Main)->execute(); class Main { public function execute() { $house = new House(); $n = getInput(); for ($i = 0; $i < $n; $i++) { fscanf(STDIN, '%d %d %d %d', $b, $f, $r, $v); $house->put($b, $f, $r, $v); } $tenant = $house->merge(); ...
[ "assignment.value.change" ]
208,738
208,739
u291836200
php
p02416
<?php while(1){ $N=trim(fgets(STDIN)); if(!$N) break; $s=0; foreach(str_split($N) as $n) $s+=$n; echo $$s,PHP_EOL; }
<?php while(1){ $N=trim(fgets(STDIN)); if(!$N) break; $s=0; foreach(str_split($N) as $n) $s+=$n; echo $s,PHP_EOL; }
[]
218,780
218,781
u064980217
php
p02416
<?php while(1){ $N=trim(fgets(STDIN)); if($N=='0') break; $L=strlen($N); $s=0; for($i=0;$i<$L;$i++) $s+=N[$i]; echo $s,PHP_EOL; }
<?php while(1){ $N=trim(fgets(STDIN)); if($N=='0') break; $L=strlen($N); $s=0; for($i=0;$i<$L;$i++) $s+=$N[$i]; echo $s,PHP_EOL; }
[]
218,783
218,784
u064980217
php
p02417
<?php $A=[]; for($i=97;$i<123;$i++) $A[$i]=0; while(1){ $S=trim(fgets(STDIN)); if(!$S){break;} foreach(str_split($S) as $c){ $n=ord($c); if($n>65){} elseif($n<91){++$A[$n+32];} elseif($n<97){} elseif($n<123){++$A[$n];} } } for($i=97;$i<123;$i++) echo chr($i),' : ',$A[$i],PHP_EOL;
<?php $A=[]; for($i=97;$i<123;$i++) $A[$i]=0; while(1){ $S=trim(fgets(STDIN)); if(!$S){break;} foreach(str_split($S) as $c){ $n=ord($c); if($n<65){} elseif($n<91){++$A[$n+32];} elseif($n<97){} elseif($n<123){++$A[$n];} } } for($i=97;$i<123;$i++) echo chr($i),' : ',$A[$i],PHP_EOL;
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
219,937
219,938
u064980217
php
p02552
<?php $n = trim(fgets(STDIN)); if ($n === 0) { echo 1; } elseif ($n === 1) { echo 0; }
<?php $n = trim(fgets(STDIN)); if ($n == 0) { echo 1; } elseif ($n == 1) { echo 0; }
[ "control_flow.branch.if.condition.change" ]
247,689
247,690
u512139348
php
p02552
<?php $input = fgets(STDIN); if($input === 0){ echo "1"; }elseif($input === 1){ echo "0"; } ?>
<?php $input = fgets(STDIN); if($input == 0){ echo "1"; }elseif($input == 1){ echo "0"; } ?>
[ "control_flow.branch.if.condition.change" ]
247,928
247,927
u666025370
php
p02570
<?php //$N = (int)trim(fgets(STDIN)); //$S = trim(fgets(STDIN)); list($D,$T,$S) = array_map('intval',explode(" ",trim(fgets(STDIN)))); //$A = array_map('intval',explode(" ",trim(fgets(STDIN)))); $T = $T * 60; $t = $D / $S; if ($T >= $t) { printf("Yes\n"); } else { printf("No\n"); }
<?php //$N = (int)trim(fgets(STDIN)); //$S = trim(fgets(STDIN)); list($D,$T,$S) = array_map('intval',explode(" ",trim(fgets(STDIN)))); //$A = array_map('intval',explode(" ",trim(fgets(STDIN)))); $T = $T * 60; $t = ($D / $S) * 60; if ($T >= $t) { printf("Yes\n"); } else { printf("No\n"); }
[ "assignment.change" ]
258,956
258,957
u278278558
php
p02577
<?php $str = fgets(STDIN); $strlen = strlen($str); $sum = 0; for($i=0;$i<$strlen; $i++){ $sum += (int)$str[$i]; } echo ($sum % 9 == 0)? "YES" : "NO" ;
<?php $str = fgets(STDIN); $strlen = strlen($str); $sum = 0; for($i=0;$i<$strlen; $i++){ $sum += (int)$str[$i]; } echo ($sum % 9 == 0)? "Yes" : "No" ;
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
274,976
274,977
u585529163
php
p02601
<?php //2倍する操作をk回やる //if b > a and c > b then "yes" else no //stud input while($line = fgets(STDIN)){ $array[] = $line; } //array[0] = "a b c"; //array[1] = "k"; $abc = explode(" ", $array[0]); $a = $abc[0]; $b = $abc[1]; $c = $abc[2]; $K = $array[1]; for($i = 1; $i <= $K; ++$i){ if($a > $b){ $b = $b...
<?php //2倍する操作をk回やる //if b > a and c > b then "yes" else no //stud input while($line = fgets(STDIN)){ $array[] = $line; } //array[0] = "a b c"; //array[1] = "k"; $abc = explode(" ", $array[0]); $a = $abc[0]; $b = $abc[1]; $c = $abc[2]; $K = $array[1]; for($i = 0; $i < $K; ++$i){ if($a >= $b){ $b = $b...
[ "literal.number.integer.change", "assignment.value.change", "control_flow.loop.for.initializer.change", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "control_flow.branch.if.condition.change" ]
303,797
303,798
u139235669
php
p02607
<?php fscanf(STDIN,"%d",$N); $ans=0; $a = array_map('intval', explode(" ", fgets(STDIN))); for($h=0;$h<count($a);$h++){ if($h%2==1){ if($a[$h]%2==1)$ans++; } } echo $ans."\n";
<?php fscanf(STDIN,"%d",$N); $ans=0; $a = array_map('intval', explode(" ", fgets(STDIN))); for($h=1;$h<=count($a);$h++){ if($h%2==1){ if($a[$h-1]%2==1)$ans++; } } echo $ans."\n";
[ "literal.number.integer.change", "assignment.value.change", "control_flow.loop.for.initializer.change", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "control_flow.branch.if.condition.change", "misc.off_by_one" ]
311,264
311,265
u558351809
php
p02608
<?php fscanf(STDIN, "%d", $a); $arr = []; for($x = 0; $x < 100 ; $x++){ for($y = 0; $y < 100 ; $y++){ for($z = 0; $z < 100 ; $z++){ $ans = ($x * $x) + ($y * $y) + ($z * $z) +($x * $y) + ($y * $z) + ($x * $z); if(isset($arr[$ans])){ $arr[$ans]++; }else{ ...
<?php fscanf(STDIN, "%d", $a); $arr = []; for($x = 1; $x < 100 ; $x++){ for($y = 1; $y < 100 ; $y++){ for($z = 1; $z < 100 ; $z++){ $ans = ($x * $x) + ($y * $y) + ($z * $z) +($x * $y) + ($y * $z) + ($x * $z); if(isset($arr[$ans])){ $arr[$ans]++; }else{ ...
[ "literal.number.integer.change", "assignment.value.change", "control_flow.loop.for.initializer.change", "misc.php_tag.add" ]
313,792
313,791
u103760477
php
p02608
<?php fscanf(STDIN, "%d", $a); $arr = []; for($x = 1; $x < 100 ; $x++){ for($y = 1; $y < 100 ; $y++){ for($z = 1; $z < 100 ; $z++){ $ans = ($x * $x) + ($y * $y) + ($z * $z) +($x * $y) + ($y * $z) + ($x * $z); if(isset($arr[$ans])){ $arr[$ans]++; }else{ ...
<?php fscanf(STDIN, "%d", $a); $arr = []; for($x = 1; $x < 100 ; $x++){ for($y = 1; $y < 100 ; $y++){ for($z = 1; $z < 100 ; $z++){ $ans = ($x * $x) + ($y * $y) + ($z * $z) +($x * $y) + ($y * $z) + ($x * $z); if(isset($arr[$ans])){ $arr[$ans]++; }else{ ...
[ "literal.number.integer.change", "assignment.value.change", "control_flow.loop.for.initializer.change", "misc.php_tag.add" ]
313,793
313,791
u103760477
php
p02622
$a=fgets(STDIN); $b=fgets(STDIN); $a_array=str_split($a,1); $b_array=str_split($b,1); $result=0; $str_int=strlen($a); for($i=0;$i<=$str_int-1;$i++){ if($a[$i]!==$b[$i]){ $result++; } } echo $result;
<?php $a=fgets(STDIN); $b=fgets(STDIN); $a_array=str_split($a,1); $b_array=str_split($b,1); $result=0; $str_int=strlen($a); for($i=0;$i<=$str_int-1;$i++){ if($a[$i]!==$b[$i]){ $result++; } } echo $result;
[ "misc.php_tag.add" ]
330,349
330,350
u145074111
php
p02641
<?php fscanf(STDIN, "%d %d", $x, $n); $array = explode(' ', trim(fgets(STDIN))); if (!isset($array)) { echo $x;exit; } $nums = range(0, 100); foreach ($array as $v) { unset($nums[$v]); } $array = array_values($nums); $lef = -1; $rig = count($array); while ($rig - $lef > 1) { $mid = ceil($lef + ($rig - $lef) ...
<?php fscanf(STDIN, "%d %d", $x, $n); $array = explode(' ', trim(fgets(STDIN))); if (!isset($array)) { echo $x;exit; } $nums = range(0, 101); foreach ($array as $v) { unset($nums[$v]); } $array = array_values($nums); $lef = -1; $rig = count($array); while ($rig - $lef > 1) { $mid = ceil($lef + ($rig - $lef) ...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change" ]
358,863
358,864
u080556513
php
p02646
<?php fscanf(STDIN, "%d%d", $A, $V); fscanf(STDIN, "%d%d", $B, $W); fscanf(STDIN, "%d", $T); $d = abs($A-$B); $dv = $V-$W; if($dv <= 0){ echo "NO"; }else{ echo $d <= $d * $dv ? "YES" : "NO"; }
<?php fscanf(STDIN, "%d%d", $A, $V); fscanf(STDIN, "%d%d", $B, $W); fscanf(STDIN, "%d", $T); $d = abs($A-$B); $dv = $V-$W; if($dv <= 0){ echo "NO"; }else{ echo $d <= $T * $dv ? "YES" : "NO"; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
365,446
365,447
u248209126
php
p02658
<?php $count = trim(fgets(STDIN)); $input = trim(fgets(STDIN)); $array = explode(' ', $input); $num = 1; $max = 10 ** 18; for($i = 0; $i < $count; $i++){ if ($array[$i] == 0) { return 0; break; }else{ $num *= $array[$i]; } } if ($num > $max){ $num = -1; } echo $num; ?>
<?php $count = trim(fgets(STDIN)); $input = trim(fgets(STDIN)); $array = explode(' ', $input); $num = 1; $max = 10 ** 18; for($i = 0; $i < $count; $i++){ if ($array[$i] == 0) { $num = 0; break; } $num *= $array[$i]; } if ($num > $max){ $num = -1; } echo $num; ?>
[ "assignment.variable.change", "function.return_value.change" ]
372,361
372,362
u804662879
php
p02675
<?php $N = trim(fgets(STDIN)); $array = str_split($N, 1); if (preg_match('/[24579]/', end($array))) { echo 'hon'; } else if(preg_match('/[0168]/', end($array))){ echo 'pon'; } else if(preg_match('/[3]/', end($array))) { echo 'bob'; }
<?php $N = trim(fgets(STDIN)); $array = str_split($N, 1); if (preg_match('/[24579]/', end($array))) { echo 'hon'; } else if(preg_match('/[0168]/', end($array))){ echo 'pon'; } else if(preg_match('/[3]/', end($array))) { echo 'bon'; }
[ "literal.string.change", "io.output.change" ]
390,450
390,451
u695721877
php
p02675
<?php $N = trim(fgets(STDIN)); $array = str_split($N, 1); if (preg_match('/[24579]/', end($array))) { echo 'hon'; } else if(preg_match('/0168/', end($array))){ echo 'pon'; } else if(preg_match('/bon/', end($array))) { echo 'bob'; }
<?php $N = trim(fgets(STDIN)); $array = str_split($N, 1); if (preg_match('/[24579]/', end($array))) { echo 'hon'; } else if(preg_match('/[0168]/', end($array))){ echo 'pon'; } else if(preg_match('/[3]/', end($array))) { echo 'bon'; }
[ "literal.string.change", "control_flow.branch.if.condition.change", "io.output.change" ]
390,452
390,451
u695721877
php
p02675
<?php fscanf(STDIN, "%d", $num); $single_num = substr($num, 2, 1); if ( $single_num == '2' || $single_num == '4' || $single_num == '5' || $single_num == '7' || $single_num == '9' ) { echo 'hon'; } elseif ( $single_num == '0' || $single_num == '1' || $single_num == '6' || $single_num == '8' ) { echo...
<?php fscanf(STDIN, "%d", $num); $single_num = substr($num, -1, 1); if ( $single_num == '2' || $single_num == '4' || $single_num == '5' || $single_num == '7' || $single_num == '9' ) { echo 'hon'; } elseif ( $single_num == '0' || $single_num == '1' || $single_num == '6' || $single_num == '8' ) { ech...
[ "assignment.value.change", "call.arguments.change" ]
392,390
392,391
u693560508
php
p02676
<?php $k = trim(fgets(STDIN)); $s = str_split(fgets(STDIN)); if (count($s) <= $k) { echo trim(implode($s)); } else { $arr = []; $arr = array_slice($s, 0, $k); array_push($arr, "..."); echo trim(implode($arr)); }
<?php $k = trim(fgets(STDIN)); $s = str_split(trim(fgets(STDIN))); if (count($s) <= $k) { echo trim(implode($s)); } else { $arr = []; $arr = array_slice($s, 0, $k); array_push($arr, "..."); echo trim(implode($arr)); }
[ "call.arguments.add", "call.arguments.change" ]
393,457
393,458
u345905665
php
p02676
<?php $k = fgets(STDIN); $s = str_split(fgets(STDIN)); if (count($s) <= $k) { echo trim(implode($s)); } else { $arr = []; $arr = array_slice($s, 0, $k); array_push($arr, "..."); echo trim(implode($arr)); }
<?php $k = trim(fgets(STDIN)); $s = str_split(trim(fgets(STDIN))); if (count($s) <= $k) { echo trim(implode($s)); } else { $arr = []; $arr = array_slice($s, 0, $k); array_push($arr, "..."); echo trim(implode($arr)); }
[ "assignment.value.change", "call.function.change", "assignment.change", "assignment.add" ]
393,459
393,458
u345905665
php
p02676
<?php $k = (int)trim(fgets(STDIN)); $s = trim(fgets(STDIN)); $len = strlen($s); if ($s<=$k) { echo $s; } else { echo substr($s, 0, $k).'...'; }
<?php $k = (int)trim(fgets(STDIN)); $s = trim(fgets(STDIN)); $len = strlen($s); if ($len<=$k) { echo $s; } else { echo substr($s, 0, $k).'...'; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
395,223
395,224
u528181687
php
p02681
<?php $s = trim(fgets(STDIN)); $t = trim(fgets(STDIN)); $count = strlen($t); $t1 = mb_substr($t, 0, $count-1); if($t1 == $s){ echo "Yes"; }else{ echo "No"; } ?>
<?php $s = trim(fgets(STDIN)); $t = trim(fgets(STDIN)); $count = strlen($t); $t1 = substr($t, 0, -1); if($t1 == $s){ echo "Yes"; }else{ echo "No"; } ?>
[ "assignment.value.change", "call.function.change", "call.arguments.change" ]
403,624
403,625
u804662879
php
p02681
<?php $s = trim(fgets(STDIN)); $t = trim(fgets(STDIN)); $count = strlen($t); $t1 = mb_substr($t, 0, $count-1); //$t2 = substr($s, -1, 1); //echo $t1."\n"; //echo $t2."\n"; if($t1 == $s){ echo "Yes"; }else{ echo "No"; } ?>
<?php $s = trim(fgets(STDIN)); $t = trim(fgets(STDIN)); $count = strlen($t); $t1 = substr($t, 0, -1); if($t1 == $s){ echo "Yes"; }else{ echo "No"; } ?>
[ "assignment.value.change", "call.function.change", "call.arguments.change" ]
403,626
403,625
u804662879
php
p02687
<?php const CONTEST_A = 'ABC'; const CONTEST_B = 'ARC'; $s = trim(fgets(STDIN)); if ($s == CONTEST_A){ echo CONTEST_B; } echo CONTEST_A;
<?php const CONTEST_A = 'ABC'; const CONTEST_B = 'ARC'; $s = trim(fgets(STDIN)); if ($s == CONTEST_A) { echo CONTEST_B; } else { echo CONTEST_A; }
[]
418,672
418,673
u514633273
php
p02693
<?php $hope = trim(fgets(STDIN)); $capacity = explode(" ", trim(fgets(STDIN))); for($i=$capacity[0]; $i<=$capacity[1]; $i++){ if($i%$hope == 0){ echo "OK"; }else{ echo "NG"; } }
<?php $hope = trim(fgets(STDIN)); $capacity = explode(" ", trim(fgets(STDIN))); for($i=$capacity[0]; $i<=$capacity[1]; $i++){ if($i%$hope == 0){ echo "OK"; return; } } echo "NG";
[ "control_flow.return.add" ]
434,119
434,120
u127740906
php
p02694
<?php fscanf(STDIN, "%d", $x); $money = 100; $year = 0; while($money < $x){ floor($money = $money * 1.01); $year++; } echo $year; ?>
<?php fscanf(STDIN, "%d", $x); $money = 100; $year = 0; while($money < $x){ $money = floor($money * 1.01); $year++; }; echo $year; ?>
[ "call.remove", "call.add" ]
437,381
437,382
u313013569
php
p02694
<?php fscanf(STDIN, "%d", $x); $money = 100; $year = 0; while($money < $x){ $money = $money * 1.01; $year++; } echo $year; ?>
<?php fscanf(STDIN, "%d", $x); $money = 100; $year = 0; while($money < $x){ $money = floor($money * 1.01); $year++; }; echo $year; ?>
[ "call.add", "call.arguments.change" ]
437,383
437,382
u313013569
php
p02694
<?php fscanf(STDIN, "%d", $x); $money = 100; $year = 0; while($money <= $x){ $money = $money * 1.01; $year++; } echo $year; ?>
<?php fscanf(STDIN, "%d", $x); $money = 100; $year = 0; while($money < $x){ $money = floor($money * 1.01); $year++; }; echo $year; ?>
[ "expression.operator.compare.change", "control_flow.loop.condition.change", "call.add", "call.arguments.change" ]
437,384
437,382
u313013569
php
p02699
<?php list($S, $W) = explode(' ', fgets(STDIN)); if ($W >= $S) { echo 'unsafe'; } else { echo 'safe'; }
<?php list($S, $W) = explode(' ', fgets(STDIN)); if ((int)$W >= (int)$S) { echo 'unsafe'; } else { echo 'safe'; }
[ "control_flow.branch.if.condition.change" ]
448,263
448,264
u424776185
php
p02700
<?php fscanf(STDIN, "%d%d%d%d", $a, $b, $c, $d); while(true){ $c-=$b; if($c<=0){echo "YES";exit;} $a-=$d; if($a<=0){echo "NO";exit;} }
<?php fscanf(STDIN, "%d%d%d%d", $a, $b, $c, $d); while(true){ $c-=$b; if($c<=0){echo "Yes";exit;} $a-=$d; if($a<=0){echo "No";exit;} }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
450,559
450,560
u248209126
php
p02705
<?php $stdin = trim(fgets(STDIN)); echo $stdin * 4.14;
<?php $stdin = trim(fgets(STDIN)); echo $stdin * 2 * 3.141592;
[ "io.output.change", "expression.operation.binary.change" ]
457,834
457,835
u266759304
php
p02711
<?php // Your code here! $insert = array(); $insert = str_split(trim(fgets(STDIN))); $count = 0; foreach($insert as $val){ if($val % 7 == 0){ $count++; } } if($count == 0){ echo "No".PHP_EOL; }else{ echo "Yes".PHP_EOL; }
<?php // Your code here! $insert = array(); $insert = str_split(trim(fgets(STDIN))); $count = 0; foreach($insert as $val){ if($val % 7 == 0 && $val != 0){ $count++; } } if($count == 0){ echo "No".PHP_EOL; }else{ echo "Yes".PHP_EOL; }
[ "control_flow.branch.if.condition.change" ]
467,341
467,342
u223501647
php
p02712
fscanf(STDIN, "%d", $a); $sum = 0; for($i = 1; $i <= $a; $i++) { if(!(($i % 3) == 0 || ($i % 5) == 0)) { $sum += $i; } } echo $sum;
<?php fscanf(STDIN, "%d", $a); $sum = 0; for($i = 1; $i <= $a; $i++) { if(!(($i % 3) == 0 || ($i % 5) == 0)) { $sum += $i; } } echo $sum; ?>
[ "misc.php_tag.add" ]
469,975
469,976
u864927262
php
p02712
fscanf(STDIN, "%d", $a); $sum = 0; for($i = 1; $i <= $number; $i++) { if(!(($i % 3) == 0 || ($i % 5) == 0)) { $sum += $i; } } echo $sum;
<?php fscanf(STDIN, "%d", $a); $sum = 0; for($i = 1; $i <= $a; $i++) { if(!(($i % 3) == 0 || ($i % 5) == 0)) { $sum += $i; } } echo $sum; ?>
[ "misc.php_tag.add" ]
469,977
469,976
u864927262
php
p02712
<?php $n = trim(fgets(STDIN)); $count = 0; for ($i=0;$i<$n;++$i) { if ($i % 3 !== 0 && $i % 5 !== 0 ) { $count+=$i; } } echo $count . PHP_EOL;
<?php $n = trim(fgets(STDIN)); $count = 0; for ($i=1;$i<=$n;++$i) { if ($i % 3 !== 0 && $i % 5 !== 0 ) { $count+=$i; } } echo $count . PHP_EOL;
[ "literal.number.integer.change", "assignment.value.change", "control_flow.loop.for.initializer.change", "expression.operator.compare.change", "control_flow.loop.for.condition.change" ]
473,839
473,840
u004646257
php
p02718
<?php // Your code here! $input = fscanf(STDIN,"%d %d",$a,$b); $array = trim(fgets(STDIN)); $array = explode(" ", $array); $border = 1 /(4 * $b); $num = 0; foreach($array as $v){ if($v/array_sum($array) > $border){ $num++; } } if($num >= $b){ echo "Yes"; }else{ echo "...
<?php // Your code here! $input = fscanf(STDIN,"%d %d",$a,$b); $array = trim(fgets(STDIN)); $array = explode(" ", $array); $border = 1 /(4 * $b); $num = 0; foreach($array as $v){ if($v/array_sum($array) >= $border){ $num++; } } if($num >= $b){ echo "Yes"; }else{ echo ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
483,384
483,385
u188102972
php
p02718
<?php $input = explode(" ",trim(fgets(STDIN))); $items = $input[0]; $target = $input[1]; $list = explode(" ",trim(fgets(STDIN))); $count = 0; $sum = 0; foreach($list as $value) { $sum+=$value; } $limit = $sum / 4 * $target; foreach($list as $value) { if ($value >= $limit) { $count++; } } echo $target <= ...
<?php $input = explode(" ",trim(fgets(STDIN))); $items = $input[0]; $target = $input[1]; $list = explode(" ",trim(fgets(STDIN))); $count = 0; $sum = 0; foreach($list as $value) { $sum+=$value; } $limit = $sum * (1 / (4 * $target)); foreach($list as $value) { if ($value >= $limit) { $count++; } } echo $ta...
[ "assignment.change" ]
484,976
484,977
u386261422
php
p02753
<?php //$data = file_get_contents("php://stdin"); fscanf(STDIN, "%s", $data); if ($data == 'AAA' || $data == 'BBB') { echo 'NO'; } else { echo 'YES'; }
<?php //$data = file_get_contents("php://stdin"); fscanf(STDIN, "%s", $data); if ($data == 'AAA' || $data == 'BBB') { echo 'No'; } else { echo 'Yes'; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
531,044
531,045
u463243905
php
p02755
<?php $arr = explode(' ', trim(fgets(STDIN))); $a = $arr[0]; $b = $arr[1]; // 8% でありうる範囲 $amin = ceil($a * 12.5); $amax = ceil(($a + 1) * 12.5); // 10% でありうる範囲 $bmin = ceil($b * 10); $bmax = ceil(($b + 1) * 10); $ret = max([$amin, $bmin]); if ($ret > $amax || $ret > ...
<?php $arr = explode(' ', trim(fgets(STDIN))); $a = $arr[0]; $b = $arr[1]; // 8% でありうる範囲 $amin = ceil($a * 12.5); $amax = ceil(($a + 1) * 12.5) - 1; // 10% でありうる範囲 $bmin = ceil($b * 10); $bmax = ceil(($b + 1) * 10) - 1; $ret = max([$amin, $bmin]); if ($ret > $amax ||...
[ "assignment.change" ]
538,482
538,483
u280911573
php
p02755
<?php $inp = explode(' ', fgets(STDIN)); for ($i = 0; $i < 2; $i++) { $inp[$i] = intval($inp[$i]); } if ($inp[0] === 0 && $inp[1] === 0) { echo '-1'; return; } for ($i = 1; $i <= 100; $i++) { if (intval($i * 0.08) === $inp[0] && intval($i * 0.1) === $inp[1]) { echo $i; return;...
<?php $inp = explode(' ', fgets(STDIN)); for ($i = 0; $i < 2; $i++) { $inp[$i] = intval($inp[$i]); } if ($inp[0] === 0 && $inp[1] === 0) { echo '-1'; return; } for ($i = 1; $i <= 1009; $i++) { if (intval($i * 0.08) === $inp[0] && intval($i * 0.1) === $inp[1]) { echo $i; return...
[ "literal.number.integer.change", "control_flow.loop.for.condition.change" ]
539,672
539,673
u608103149
php
p02759
<?php $input = file_get_contents('php://stdin'); $n = intval($input); echo ($n / 2 + $n % 2) . PHP_EOL;
<?php $input = file_get_contents('php://stdin'); $n = intval($input); echo (($n + $n % 2) / 2) . PHP_EOL;
[ "expression.operation.binary.remove" ]
545,495
545,496
u384036157
php
p02760
<?php $line1 = fgets(STDIN); $line2 = fgets(STDIN); $line3 = fgets(STDIN); $bingo_card1 = explode(" ", $line1); $bingo_card2 = explode(" ", $line2); $bingo_card3 = explode(" ", $line3); $bingo_check1 = [" ", " ", " "]; $bingo_check2 = [" ", " ", " "]; $bingo_check3 = [" ", " ", " "]; $last = "No"; fscanf(STDIN, "%d...
<?php $line1 = fgets(STDIN); $line2 = fgets(STDIN); $line3 = fgets(STDIN); $bingo_card1 = explode(" ", $line1); $bingo_card2 = explode(" ", $line2); $bingo_card3 = explode(" ", $line3); $bingo_check1 = [" ", " ", " "]; $bingo_check2 = [" ", " ", " "]; $bingo_check3 = [" ", " ", " "]; $last = "No"; fscanf(STDIN, "%d...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
546,718
546,719
u864927262
php
p02760
<?php fscanf(STDIN, "%d %d %d", $a11, $a12, $a13); fscanf(STDIN, "%d %d %d", $a21, $a22, $a23); fscanf(STDIN, "%d %d %d", $a31, $a32, $a33); fscanf(STDIN, "%d", $n); $inputs = []; for ($i = 0; $n > $i; $i++) { fscanf(STDIN, "%d", $x); $inputs[] = (int)$x; } $map = [ $a11 => 0, $a12 => 0, $a13 => 0, ...
<?php fscanf(STDIN, "%d %d %d", $a11, $a12, $a13); fscanf(STDIN, "%d %d %d", $a21, $a22, $a23); fscanf(STDIN, "%d %d %d", $a31, $a32, $a33); fscanf(STDIN, "%d", $n); $inputs = []; for ($i = 0; $n > $i; $i++) { fscanf(STDIN, "%d", $x); $inputs[] = (int)$x; } $map = [ $a11 => 0, $a12 => 0, $a13 => 0, ...
[ "assignment.value.change", "identifier.change" ]
548,427
548,428
u024780318
php
p02765
<?php fscanf(STDIN, "%d %d", $n, $r); echo $r - 100*max(0, 10 - $n); ?>
<?php fscanf(STDIN, "%d %d", $n, $r); echo $r + 100*max(0, 10 - $n); ?>
[ "misc.opposites", "expression.operator.arithmetic.change", "io.output.change", "expression.operation.binary.change" ]
556,497
556,498
u094155508
php
p02765
<?php fscanf(STDIN, "%d %d", $n, $r); echo $r - max(0, 10 - $n); ?>
<?php fscanf(STDIN, "%d %d", $n, $r); echo $r + 100*max(0, 10 - $n); ?>
[ "misc.opposites", "expression.operator.arithmetic.change", "io.output.change", "expression.operation.binary.change" ]
556,499
556,498
u094155508
php
p02766
<?php fscanf(STDIN, "%d %d", $n, $k); $num = base_convert($n, 10, $k); $ans = mb_strlen($num); echo $ans;
<?php fscanf(STDIN, "%d %d", $n, $k); $num = base_convert($n, 10, $k); $ans = strlen($num); echo $ans;
[ "assignment.value.change", "call.function.change" ]
560,566
560,567
u713151864
php
p02766
<?php fscanf(STDIN, "%d %d", $n, $k); $num = base_convert($n, 10, $k); $ans = mb_strlen($num);
<?php fscanf(STDIN, "%d %d", $n, $k); $num = base_convert($n, 10, $k); $ans = strlen($num); echo $ans;
[ "assignment.value.change", "call.function.change" ]
560,568
560,567
u713151864
php
p02771
$input = trim(fgets(STDIN)); $value = sscanf($input, '%s %s %s'); $poor = false; if ($value[0] === $value[1] && $value[1] !== $value[2]) $poor = true; if ($value[1] === $value[2] && $value[2] !== $value[0]) $poor = true; if ($value[0] === $value[2] && $value[0] !== $value[1]) $poor = true; if($poor) { echo "Ye...
<?PHP $input = fgets(STDIN); $value = sscanf($input, '%s %s %s'); $poor = false; if ($value[0] === $value[1] && $value[1] !== $value[2]) $poor = true; if ($value[1] === $value[2] && $value[2] !== $value[0]) $poor = true; if ($value[0] === $value[2] && $value[0] !== $value[1]) $poor = true; if($poor) { echo "Y...
[]
566,640
566,642
u690574103
php
p02771
$input = trim(fgets(STDIN)); $value = sscanf($input, '%s %s %s'); $poor = false; if ($value[0] === $value[1] && $value[1] !== $value[2]) $poor = true; if ($value[1] === $value[2] && $value[2] !== $value[0]) $poor = true; if ($value[0] === $value[2] && $value[0] !== $value[1]) $poor = true; if($poor) { echo "Ye...
<?PHP $input = fgets(STDIN); $value = sscanf($input, '%s %s %s'); $poor = false; if ($value[0] === $value[1] && $value[1] !== $value[2]) $poor = true; if ($value[1] === $value[2] && $value[2] !== $value[0]) $poor = true; if ($value[0] === $value[2] && $value[0] !== $value[1]) $poor = true; if($poor) { echo "Y...
[]
566,644
566,642
u690574103
php
p02773
<?php fscanf(STDIN, "%d", $n); $ss = array(); for ($i=0; $i < $n; $i++) { fscanf(STDIN, "%s", $s); if (isset($ss[$s])) { $ss[$s]++; } else { $ss[$s] = 0; } } arsort($ss); $before = 0; $answers = array(); foreach ($ss as $k => $v) { if ($v >= $before) { $answers[] = $k; } else { exit; }...
<?php fscanf(STDIN, "%d", $n); $ss = array(); for ($i=0; $i < $n; $i++) { fscanf(STDIN, "%s", $s); if (isset($ss[$s])) { $ss[$s]++; } else { $ss[$s] = 0; } } arsort($ss); $before = 0; $answers = array(); foreach ($ss as $k => $v) { if ($v >= $before) { $answers[] = $k; } else { break; ...
[ "control_flow.exit.remove", "control_flow.break.add" ]
571,510
571,511
u080556513
php
p02778
<?php $u = trim(fgets(STDIN)); $cnt = mb_strlen($u); for($i = 0; $i < $cnt; $i++) { echo 'x'; } echo PHP_EOL;
<?php $u = trim(fgets(STDIN)); $cnt = strlen($u); for($i = 0; $i < $cnt; $i++) { echo 'x'; } echo PHP_EOL;
[ "assignment.value.change", "call.function.change" ]
575,374
575,375
u492334861
php
p02779
<?php fscanf(STDIN, '%d', $n); $numbers = fgets(STDIN); $exploded_numbers = explode(' ', trim($numbers)); $counted_nums = array_count_values($exploded_numbers); rsort($counted_nums); if ($counted_nums[0] > 1) { echo 'No'; } else { echo 'Yes'; }
<?php fscanf(STDIN, '%d', $n); $numbers = fgets(STDIN); $exploded_numbers = explode(' ', trim($numbers)); $counted_nums = array_count_values($exploded_numbers); rsort($counted_nums); if ($counted_nums[0] > 1) { echo 'NO'; } else { echo 'YES'; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
578,475
578,476
u179703950
php
p02784
<?php fscanf(STDIN,"%d%d%d",$h,$n); $a_li = explode(" ",trim(fgets(STDIN))); foreach($a_li as $a){ $h -= $a; } if($h<=0){ echo "Yes"; }else{ echo "No"; }
<?php fscanf(STDIN,"%d%d",$h,$n); $a_li = explode(" ",trim(fgets(STDIN))); foreach($a_li as $a){ $h -= $a; } if($h<=0){ echo "Yes"; }else{ echo "No"; }
[ "literal.string.change", "call.arguments.change" ]
584,772
584,773
u553494195
php
p02790
fscanf(STDIN, "%s %s", $a, $b); $aa = str_repeat($a, $b); $bb = str_repeat($b, $a); echo strcmp($aa, $bb) < 0 ? $aa : $bb;
<?php fscanf(STDIN, "%s %s", $a, $b); $aa = str_repeat($a, $b); $bb = str_repeat($b, $a); echo strcmp($aa, $bb) < 0 ? $aa : $bb;
[ "misc.php_tag.add" ]
596,024
596,025
u274031648
php
p02801
fscanf(STDIN, "%c", $char); echo chr(ord($char) + 1);
<?php fscanf(STDIN, "%c", $char); echo chr(ord($char) + 1);
[ "misc.php_tag.add" ]
604,922
604,923
u917829175
php
p02802
<?php list($n, $m) = explode(' ', trim(fgets(STDIN))); $waAns = 0; $acCheck = []; $waCount = []; for ($i=0; $i<$m; $i++) { list($p, $s) = explode(' ', trim(fgets(STDIN))); // AC済ならスキップ if (isset($acCheck[$p])) { continue; } // 初回AC数を数える // 初回AC時点でのその問題のWA数も加算する if ($s == 'AC') { ...
<?php list($n, $m) = explode(' ', trim(fgets(STDIN))); $waAns = 0; $waCnt = 0; $acCheck = []; $waCount = []; for ($i=0; $i<$m; $i++) { list($p, $s) = explode(' ', trim(fgets(STDIN))); // AC済ならスキップ if (isset($acCheck[$p])) { continue; } // 初回AC数を数える // 初回AC時点でのその問題のWA数も加算する if ($s...
[ "assignment.add" ]
606,671
606,672
u618531621
php