buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
lines = $stdin.read.split(?\n).map(&:to_i)
lines.each.with_index(1) do |line, i|
puts "Case #{i}: #{line}"
i += 1
end | lines = $stdin.read.split(?\n).map(&:to_i)
lines.each.with_index(1) do |line, i|
break if line == 0
puts "Case #{i}: #{line}"
i += 1
end | [["+", 196, 737, 8, 736, 0, 751, 8, 94, 0, 94], ["+", 0, 652, 196, 737, 8, 736, 0, 751, 0, 121], ["+", 196, 737, 8, 736, 0, 751, 15, 738, 31, 22], ["+", 196, 737, 8, 736, 0, 751, 15, 738, 17, 60], ["+", 196, 737, 8, 736, 0, 751, 15, 738, 12, 612]] | 4 | 45 |
count = 1;
while true do
num = gets.to_i;
if num == 0 then
break;
end
puts "Case " + count.to_s + ": " + num.to_s;
count.next;
end | count = 1;
while true
num = gets.to_i;
if num == 0 then
break;
end
puts "Case " + count.to_s + ": " + num.to_s;
count += 1;
end | [["-", 36, 36, 0, 493, 0, 89, 8, 170, 0, 170], ["-", 0, 493, 0, 89, 8, 170, 0, 652, 17, 131], ["-", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 755, 17, 107], ["+", 0, 493, 0, 89, 8, 170, 0, 755, 12, 612]] | 4 | 43 |
i = 0
user = {}
while num = gets do
n = num.to_i
if n == 0
break
end
i += 1
user[i] = "Case #{i}:#{n}"
end
user.each do |key,value|
puts "#{value}"
end | i = 0
user = {}
while num = gets do
n = num.to_i
if n == 0
break
end
i += 1
user[i] = "Case #{i}: #{n}"
end
user.each do |key,value|
puts "#{value}"
end | [["-", 0, 89, 8, 170, 0, 662, 12, 557, 0, 6], ["+", 0, 89, 8, 170, 0, 662, 12, 557, 0, 6]] | 4 | 58 |
count = 1
while true do
input_data = STDIN.gets
if input_data.to_i == 0
break
end
print "Case" + count.to_s + ": " + input_data
count += 1
end | count = 1
while true do
input_data = STDIN.gets
if input_data.to_i == 0
break
end
print "Case " + count.to_s + ": " + input_data
count += 1
end | [["-", 0, 738, 31, 738, 31, 738, 31, 557, 0, 6], ["+", 0, 738, 31, 738, 31, 738, 31, 557, 0, 6]] | 4 | 37 |
i=1
while
x = gets.to_i
if (x == 0)
break
end
puts "Case #{i}:#{x}"
i = i+1
end | i=1
while
x = gets.to_i
if (x == 0)
break
end
puts "Case #{i}: #{x}"
i = i+1
end | [["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 34 |
i = 0
while i do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}:#{x}"
end | i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case #{i}: #{x}"
end | [["-", 36, 36, 36, 36, 0, 493, 0, 89, 15, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 89, 15, 612], ["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 32 |
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}:#{x}"
end | i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i = i +1
puts "Case #{i}: #{x}"
end | [["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 34 |
i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i += 1
puts "case"+ " " + "#{i}" + ":" + " " +"#{x}"
end | i = 0
while 1 do
x = gets.to_i
if x == 0
break
end
i += 1
puts "Case"+ " " + "#{i}" + ":" + " " +"#{x}"
end | [["-", 31, 738, 31, 738, 31, 738, 31, 557, 0, 6], ["+", 31, 738, 31, 738, 31, 738, 31, 557, 0, 6]] | 4 | 49 |
count = 0
while line = gets
n = line.chomp
break if n == 0
count += 1
puts "Case " + count.to_s + ": " + n
end | count = 0
while line = gets
n = line.chomp
break if n == "0"
count += 1
puts "Case " + count.to_s + ": " + n
end | [["+", 8, 170, 0, 751, 15, 738, 12, 557, 0, 62]] | 4 | 35 |
i = 1
while str = $stdin.gets
a = str.strip
a = a.to_i
break if a == 0
p "Case #{i}: #{a}"
i += 1
end | i = 1
while str = $stdin.gets
a = str.strip
a = a.to_i
break if a == 0
puts "Case #{i}: #{a}"
i += 1
end | [["-", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22]] | 4 | 39 |
n=1
loop{
if a=gets.to_i==0
break
end
puts"Case #{n}: #{a}"
n+=1
} | n=1
loop{
if (a=gets.to_i)==0
break
end
puts"Case #{n}: #{a}"
n+=1
} | [["+", 8, 734, 0, 121, 15, 738, 31, 739, 0, 24], ["+", 8, 734, 0, 121, 15, 738, 31, 739, 0, 25]] | 4 | 30 |
numsArray = Array.new
numsArray[0] = 0
i = 1
loop {
numsArray[i] = gets.to_i
if numsArray[i] == 0
break
end
i += 1
}
i -= 1
caseNumber = 1
i.times do
print "Case ", caseNumber, ": ", nums[caseNumber], "\n"
caseNumber += 1
end | numsArray = Array.new
numsArray[0] = 0
i = 1
loop {
numsArray[i] = gets.to_i
if numsArray[i] == 0
break
end
i += 1
}
i -= 1
caseNumber = 1
i.times do
print "Case ", caseNumber, ": ", numsArray[caseNumber], "\n"
caseNumber += 1
end | [["-", 8, 736, 0, 652, 3, 4, 0, 742, 500, 22], ["+", 8, 736, 0, 652, 3, 4, 0, 742, 500, 22]] | 4 | 70 |
i = 0
while (n = gets.chomp) != '0'
puts "Case #{i+=1}:#{n}"
end | i = 0
while (n = gets.chomp) != '0'
puts "Case #{i+=1}: #{n}"
end | [["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 29 |
x=1
while true
a=gets.to_i
if a==0
break
end
puts "Case #{x}:#{a}"
x+=1
end
| x=1
while true
a=gets.to_i
if a==0
break
end
puts "Case #{x}: #{a}"
x+=1
end
| [["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 31 |
i = 0
while d = gets.to_i != 0
puts "Case #{i += 1}: #{d}"
end
| i = 0
while (d = gets.to_i) != 0
puts "Case #{i += 1}: #{d}"
end
| [["+", 0, 493, 0, 89, 15, 738, 31, 739, 0, 24], ["+", 0, 493, 0, 89, 15, 738, 31, 739, 0, 25]] | 4 | 25 |
1.step do |i|
n = gets.to_i
break if n.zero?
puts "Case #{i}: ¥{n}"
end
| 1.step do |i|
n = gets.to_i
break if n.zero?
puts "Case #{i}: #{n}"
end
| [["-", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 557, 0, 284, 0, 775], ["+", 0, 652, 3, 4, 0, 557, 0, 284, 0, 22], ["+", 0, 652, 3, 4, 0, 557, 0, 284, 0, 46]] | 4 | 26 |
i = 1
while (a = gets.to_i) != 0
puts "Case #{i}: #{a}}"
i += 1
end
| i = 1
while (a = gets.to_i) != 0
puts "Case #{i}: #{a}"
i += 1
end
| [["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 29 |
i = 1
x = 1
until x.zero?
x = gets.to_i
case x
when 0
break
else
puts "Case#{i}: #{x}"
i += 1
end
end
| i = 1
x = 1
until x.zero?
x = gets.to_i
case x
when 0
break
else
puts "Case #{i}: #{x}"
i += 1
end
end
| [["-", 0, 95, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 95, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 37 |
#include <iostream>
using namespace std;
int main() {
int data[10000], i;
while (1) {
cin >> data[i];
if (data[i] == 0)
break;
i++;
}
for (int j = 0; j < i; j++) {
cout << "Case" << j + 1 << ':' << data[j] << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int data[10000], i;
while (1) {
cin >> data[i];
if (data[i] == 0)
break;
i++;
}
for (int j = 0; j < i; j++) {
cout << "Case " << j + 1 << ": " << data[j] << endl;
}
return 0;
} | [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 104], ["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 87 |
#include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1;; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << ":" << x << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1;; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << ":"
<< " " << x << endl;
}
return 0;
} | [["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 61 |
#include <iostream>
int main(void) {
using namespace std;
int x, i = 1;
while (cin >> x) {
if (x == 0)
break;
cout << "Case " << i << " " << x << endl;
i++;
}
return 0;
} | #include <iostream>
int main(void) {
using namespace std;
int x, i = 1;
while (cin >> x) {
if (x == 0)
break;
cout << "Case " << i << ": " << x << endl;
i++;
}
return 0;
} | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 58 |
#include <iostream>
using namespace std;
int main() {
int a[10000];
int i = 0;
cin >> a[i];
while (a[i] != 0) {
cout << "Case " << i + 1 << ": " << a[i];
i++;
cin >> a[i];
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a[10000];
int i = 0;
cin >> a[i];
while (a[i] != 0) {
cout << "Case " << i + 1 << ": " << a[i] << endl;
i++;
cin >> a[i];
}
return 0;
} | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 73 |
#include <iostream>
#include <string>
using namespace std;
namespace Domain {
class Result {
int value;
public:
Result(int value = 0) : value(value) {}
int disp() { return value; }
bool isEnd() { return !value; }
};
} // namespace Domain
using namespace Domain;
namespace InterfaceAdapter {
class ResultDisp {
... | #include <iostream>
#include <string>
using namespace std;
namespace Domain {
class Result {
int value;
public:
Result(int value = 0) : value(value) {}
int disp() { return value; }
bool isEnd() { return !value; }
};
} // namespace Domain
using namespace Domain;
namespace InterfaceAdapter {
class ResultDisp {
... | [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 311 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int count = 0;
int a[1000];
while (true) {
cin >> a[count];
if (a[count] == 0) {
break;
}
count++;
}
for (int i = 0; i < count; i++) {
cout << "Case " << i << ": " << a[i] << endl;
}
return 0;
} | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int count = 1;
int a[10000];
while (true) {
cin >> a[count];
if (a[count] == 0) {
break;
}
count++;
}
for (int i = 1; i < count; i++) {
cout << "Case " << i << ": " << a[i] << endl;
}
return 0;
} | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 92 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int a[256], i = 0;
while (cin >> a[i] && a[i])
i++;
for (int j = 0; j <= i; j++)
printf("Case %d: %d\n", j, a[j]);
} | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int a[10000], i = 1;
while (cin >> a[i] && a[i])
i++;
for (int j = 1; j < i; j++)
printf("Case %d: %d\n", j, a[j]);
} | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, ... | 1 | 70 |
// case.cpp
#include <iostream>
using namespace std;
int main() {
int num, a = 0;
while (true) {
cin >> num;
if (num == 0) {
break;
}
a++;
cout << "Case " << a << ": " << num;
}
}
| // case.cpp
#include <iostream>
using namespace std;
int main() {
int num, a = 0;
while (true) {
cin >> num;
if (num == 0) {
break;
}
a++;
cout << "Case " << a << ": " << num << endl;
}
}
| [["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 57 |
#include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1;; i++) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i << ":" << x << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1;; i++) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i << ": " << x << endl;
}
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 56 |
#include <stdio.h>
int main(void) {
int i, j, x;
int a[10000];
for (i = 1;; i++) {
scanf("%d", &x);
if (x == 0) {
break;
}
a[i] = x;
}
for (j = 1; j < i + 1; j++) {
printf("Case %d: %d\n", a[j], x);
}
return 0;
}
| #include <stdio.h>
int main(void) {
int i, j, x;
int a[10000];
for (i = 1;; i++) {
scanf("%d", &x);
if (x == 0) {
break;
}
a[i] = x;
}
for (j = 1; j < i; j++) {
printf("Case %d: %d\n", j, a[j]);
}
return 0;
}
| [["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 96 |
#include <iostream>
using namespace std;
int main(void) {
int x, i = 0;
while (++i) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << ":" << x << endl;
}
}
| #include <iostream>
using namespace std;
int main(void) {
int x, i = 0;
while (++i) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << ": " << x << endl;
}
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 57 |
#include <iostream>
#include <vector>
int main() {
std::vector<int> inputs;
inputs.reserve(10000);
int val;
while (std::cin >> val) {
inputs.push_back(val);
}
for (int i = 0; i < inputs.size(); i++) {
std::cout << "Case " << i + 1 << ": " << inputs.at(i) << std::endl;
}
return 0;
}
| #include <iostream>
#include <vector>
int main() {
std::vector<int> inputs;
inputs.reserve(10000);
int val;
while (std::cin >> val && val) {
inputs.push_back(val);
}
for (int i = 0; i < inputs.size(); i++) {
std::cout << "Case " << i + 1 << ": " << inputs.at(i) << std::endl;
}
return 0;
}
| [["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22]] | 1 | 95 |
#include <iostream>
using namespace std;
int main() {
int count = 1;
int p;
while (1) {
cin >> p;
if (cin.fail()) {
break;
}
cout << "Case " << count << ": " << p << endl;
count++;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int count = 1;
int p;
while (1) {
cin >> p;
if (p == 0) {
break;
}
cout << "Case " << count << ": " << p << endl;
count++;
}
return 0;
}
| [["-", 0, 57, 15, 339, 51, 2, 63, 118, 28, 22], ["-", 0, 57, 15, 339, 51, 2, 63, 118, 17, 131], ["-", 0, 57, 15, 339, 51, 2, 63, 118, 119, 120], ["-", 0, 57, 15, 339, 51, 2, 3, 4, 0, 24], ["-", 0, 57, 15, 339, 51, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60],... | 1 | 64 |
#include <iostream>
using namespace std;
int main() {
int w, h, x, y = 1, r;
while (true) {
cin >> x;
if (x == 0)
break;
cout << "Case " << y << ": " << x;
y++;
}
// cout << endl;
}
| #include <iostream>
using namespace std;
int main() {
int w, h, x, y = 1, r;
while (true) {
cin >> x;
if (x == 0)
break;
cout << "Case " << y << ": " << x << endl;
y++;
}
// cout << endl;
}
| [["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 61 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a;
int i = 0;
cin >> a;
while (a) {
cout << "Case " << i << ": " << a << endl;
++i;
cin >> a;
}
}
| #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a;
int i = 1;
cin >> a;
while (a) {
cout << "Case " << i << ": " << a << endl;
++i;
cin >> a;
}
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 55 |
#include <bits/stdc++.h>
int main() {
int n;
for (int i = 1;; i++) {
scanf("%d", &n);
if (n)
printf("Case %d: %d", i, n);
else
break;
}
}
| #include <bits/stdc++.h>
int main() {
int n;
for (int i = 1;; i++) {
scanf("%d", &n);
if (n != 0)
printf("Case %d: %d\n", i, n);
else
break;
}
}
| [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 52 |
#include <iostream>
using namespace std;
int main() {
int t = 0;
for (int x = 1; x <= 10000; x++) {
cin >> t;
if (t == 0) {
break;
} else {
cout << "Case " << x << " :" << t << endl;
}
}
}
| #include <iostream>
using namespace std;
int main() {
int t = 0;
for (int x = 1; x <= 10000; x++) {
cin >> t;
if (t == 0) {
break;
} else {
cout << "Case " << x << ": " << t << endl;
}
}
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 66 |
#include <cstdio>
int main() {
int n;
int i = 0;
while (scanf("%d", &n) && n != 0) {
i++;
printf("Case%d:%d\n", i, n);
}
return 0;
}
| #include <cstdio>
int main() {
int n;
int i = 0;
while (scanf("%d", &n) && n != 0) {
i++;
printf("Case %d: %d\n", i, n);
}
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 52 |
#include <iostream>
using namespace std;
int main() {
int x, num = 1;
cin >> x;
while (x != 0) {
cout << "Case " << num << ":" << x << endl;
num++;
cin >> x;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x, num = 1;
cin >> x;
while (x != 0) {
cout << "Case " << num << ": " << x << endl;
num++;
cin >> x;
}
return 0;
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 57 |
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int x;
for (int i = 1; 1; i++) {
cin >> x;
if (x == 0)
break;
cout << "Case"
<< " " << i << ":" << x << endl;
}
}
| #include <iomanip>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int x;
for (int i = 1; 1; i++) {
cin >> x;
if (x == 0)
break;
cout << "Case"
<< " " << i << ":"
<< " " << x << endl;
}
}
| [["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]] | 1 | 67 |
#include <stdio.h>
int main() {
int i, j, a[10000];
for (i = 1; i < 10000; i++) {
scanf("%d", &a[i]);
if (a[i] == 0) {
break;
}
}
for (j = 1; j < i + 1; j++) {
printf("Case %d: %d\n", j, a[j]);
if (a[j] == 0) {
break;
}
}
return 0;
}
| #include <stdio.h>
int main() {
int i, j, a[10000];
for (i = 1; i <= 10000; i++) {
scanf("%d", &a[i]);
if (a[i] == 0) {
break;
}
}
for (j = 1; j < i; j++) {
printf("Case %d: %d\n", j, a[j]);
if (a[j] == 0) {
break;
}
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 107 |
#include <iostream>
using namespace std;
int main() {
int a = 0, i = 0;
cin >> a;
while (a != 0) {
cout << "Case " << i++ << ": " << a << endl;
cin >> a;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a = 0, i = 1;
cin >> a;
while (a != 0) {
cout << "Case " << i++ << ": " << a << endl;
cin >> a;
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 57 |
#include <iostream>
using namespace std;
#define MAX_DATA_NUM 10000
int main() {
int dataNum = 0, inValue[MAX_DATA_NUM] = {0}, i = 0;
for (i = 0; i < MAX_DATA_NUM; i++) {
cin >> inValue[i];
if (0 == inValue[i]) {
break;
}
}
dataNum = i;
for (i = 0; i < dataNum; i++) {
cout << "Cas... | #include <iostream>
using namespace std;
#define MAX_DATA_NUM 10001 // Contain last zero
int main() {
int dataNum = 0, inValue[MAX_DATA_NUM] = {0}, i = 0;
for (i = 0; i < MAX_DATA_NUM; i++) {
cin >> inValue[i];
if (0 == inValue[i]) {
break;
}
}
dataNum = i;
for (i = 0; i < dataNum; i+... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13]] | 1 | 109 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int temp = 1;
vector<int> list;
// 0になるまで読み込む
while (true) {
cin >> temp;
if (temp == 0) {
break;
}
list.push_back(temp);
}
//配列内の全ての要素をプリントする
for (int i = 0; i < list.size(); i++) {
cout << "Case " << i ... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int temp = 1;
vector<int> list;
// 0になるまで読み込む
while (true) {
cin >> temp;
if (temp == 0) {
break;
}
list.push_back(temp);
}
//配列内の全ての要素をプリントする
for (int i = 0; i < list.size(); i++) {
cout << "Case " << i ... | [["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13]] | 1 | 96 |
#include <iostream>
using namespace std;
int main() {
int x;
for (int i = 0; i < 1000; i++) {
cin >> x;
if (x == 0) {
return 0;
} else {
cout << "Case " << i << ":" << x << endl;
}
}
}
| #include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1; i < 10001; i++) {
cin >> x;
if (x == 0) {
return 0;
} else {
cout << "Case " << i << ": " << x << endl;
}
}
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 65 |
#include <iostream>
void output_each_case() {
int x;
for (int i = 0; i < 10000; i++) {
std::cin >> x;
if (x == 0)
break;
std::cout << "Case " << i << ": " << x << std::endl;
}
}
int main() {
output_each_case();
return 0;
}
| #include <iostream>
void output_each_case() {
int x;
for (int i = 1; i <= 10000; i++) {
std::cin >> x;
if (x == 0)
break;
std::cout << "Case " << i << ": " << x << std::endl;
}
}
int main() {
output_each_case();
return 0;
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 74 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int i = 1, x;
while (1) {
cin >> x;
if (x == 0)
break;
cout << "case " << i << ": " << x << endl;
x = 0;
i++;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int i = 1, x;
while (1) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i << ": " << x << endl;
x = 0;
i++;
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 63 |
#include <iostream>
using namespace std;
int main() {
int n = 1;
int x;
while (1) {
cin >> x;
if (x == 0)
break;
cout << "Case " << n << ": " << x << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int n = 1;
int x;
while (1) {
cin >> x;
if (x == 0)
break;
cout << "Case " << n << ": " << x << endl;
n++;
}
return 0;
}
| [["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 29], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 57 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int loop = 0, tmp;
int x[10000];
while (true) {
cin >> tmp;
if (tmp == 0) {
break;
} else {
x[loop] = tmp;
loop++;
}
}
for (int i = 0; i < loop; i++) {
cout << "Case " << i << ": " << x[i] << "\n";
}
return 0... | #include <bits/stdc++.h>
using namespace std;
int main() {
int loop = 0, tmp;
int x[10000];
while (true) {
cin >> tmp;
if (tmp == 0) {
break;
} else {
x[loop] = tmp;
loop++;
}
}
for (int i = 0; i < loop; i++) {
cout << "Case " << i + 1 << ": " << x[i] << "\n";
}
retu... | [["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13]] | 1 | 98 |
#include <stdio.h>
int main() {
int i = 0, x;
while (1) {
scanf("%d", &x);
if (x == 0)
break;
++i;
printf("Case 1: %d\n", x);
}
return 0;
}
| #include <stdio.h>
int main() {
int i = 0, x;
while (1) {
scanf("%d", &x);
if (x == 0)
break;
++i;
printf("Case %d: %d\n", i, x);
}
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 55 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int i;
for (i = 0;; i++) {
int x;
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << "; " << x << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int i;
for (i = 1;; i++) {
int x;
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << ": " << x << endl;
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 63 |
#include <iostream>
using namespace std;
int main() {
int a[10000];
int x = 0;
int y;
for (int i = 0; x != 1; i++) {
cin >> a[i];
y = i;
if (a[i] == 0) {
x = 1;
}
}
for (int i = 0; i != y; i++) {
cout << "Case " << i + 1 << ":" << a[i] << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a[10000];
int x = 0;
int y;
for (int i = 0; x != 1; i++) {
cin >> a[i];
y = i;
if (a[i] == 0) {
x = 1;
}
}
for (int i = 0; i != y; i++) {
cout << "Case " << i + 1 << ": " << a[i] << endl;
}
return 0;
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 108 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, i;
for (i = 1;; i++) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i << ": " << x;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x, i;
for (i = 1;; i++) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i << ": " << x << endl;
}
}
| [["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 55 |
#include <iostream>
using namespace std;
int main() {
int i, x;
while (1) {
cin >> x;
if (x == 0)
break;
else
cout << "Case " << i << ": " << x << endl;
i++;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int i = 1, x;
while (1) {
cin >> x;
if (x == 0)
break;
else
cout << "Case " << i << ": " << x << endl;
i++;
}
return 0;
}
| [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 58 |
#include <iostream>
using namespace std;
int main() {
// your code goes here
int i = 1;
int value;
while (1) {
cin >> value;
if (value == 0) {
break;
} else {
cout << "case " << i << ": " << value << endl;
++i;
}
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int i = 1;
int value;
while (1) {
cin >> value;
if (value == 0)
break;
cout << "Case " << i << ": " << value << endl;
++i;
}
return 0;
}
| [["-", 0, 52, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 52, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 52, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 66 |
#include <iostream>
int main() {
int x;
int i = 0;
while (i < 0) {
std::cin >> x;
if (x == 0)
break;
i++;
std::cout << "Case " << i << ":" << x << std::endl;
}
return 0;
}
| #include <iostream>
int main() {
int x;
int i = 0;
while (1) {
std::cin >> x;
if (x == 0)
break;
i++;
std::cout << "Case " << i << ": " << x << std::endl;
}
return 0;
}
| [["-", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 51, 13], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 64 |
#include <stdio.h>
int main() {
int i = 1;
int x;
while (1) {
scanf("%d", &x);
if (x) {
printf("Case %d: %d", i, x);
i++;
} else {
break;
}
}
return 0;
}
| #include <stdio.h>
int main() {
int i = 1;
int x;
while (1) {
scanf("%d", &x);
if (x) {
printf("Case %d: %d\n", i, x);
i++;
} else {
break;
}
}
return 0;
}
| [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 60 |
#include <iostream>
using namespace std;
int main() {
int a, x;
for (a = 1; a < 10001; a++) {
cin >> x;
if (x == 0)
break;
cout << "case " << a << ": " << x << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
int a, x;
for (a = 1; a < 10001; a++) {
cin >> x;
if (x == 0)
break;
cout << "Case " << a << ": " << x << endl;
}
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 60 |
#include <cstdio>
int main(void) {
int a;
int count = 1;
scanf("%d", &a);
while (a != 0) {
printf("Case %d: %d\n", count, a);
scanf("%d", &a);
}
return 0;
}
| #include <cstdio>
int main(void) {
int a;
int count = 1;
scanf("%d", &a);
while (a != 0) {
printf("Case %d: %d\n", count, a);
scanf("%d", &a);
count++;
}
return 0;
}
| [["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 29], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 60 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int i;
for (i = 1;; i = i + 1) {
int x;
cin >> x;
if (x == 0) {
break;
} else {
cout << "case " << i << ": " << x << endl;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int i;
for (i = 1;; i = i + 1) {
int x;
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << ": " << x << endl;
}
}
| [["-", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 66 |
#include <iostream>
using namespace std;
int main() {
int i, x;
for (i = 0; x > 0; ++i) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i << ": " << x << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int i, x;
for (i = 1; i > 0; ++i) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i << ": " << x << endl;
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22]] | 1 | 63 |
#include "iostream"
using namespace std;
int main() {
int x;
int count = 1;
while (cin >> x, x) {
cout << "case " << count << ": " << x << endl;
count++;
}
}
| #include "iostream"
using namespace std;
int main() {
int x;
int count = 1;
while (cin >> x, x) {
cout << "Case " << count << ": " << x << endl;
count++;
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]] | 1 | 51 |
#include <iostream>
using namespace std;
int main(void) {
int x[10000];
for (int i = 0; i < 10000; i++) {
cin >> x[i];
if (x[i] == 0)
break;
}
for (int i = 0; i < 10000; i++) {
if (x[i] == 0)
break;
cout << "case " << i + 1 << ": " << x[i] << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main(void) {
int x[10000];
for (int i = 0; i < 10000; i++) {
cin >> x[i];
if (x[i] == 0)
break;
}
for (int i = 0; i < 10000; i++) {
if (x[i] == 0)
break;
cout << "Case " << i + 1 << ": " << x[i] << endl;
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 104 |
//============================================================================
// Name : HairetuTest.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#includ... | //============================================================================
// Name : HairetuTest.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#includ... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]] | 1 | 67 |
//============================================================================
// Name : HairetuTest.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#includ... | //============================================================================
// Name : HairetuTest.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#includ... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 51, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]] | 1 | 67 |
//============================================================================
// Name : HairetuTest.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#includ... | //============================================================================
// Name : HairetuTest.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#includ... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 51, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]] | 1 | 70 |
#include <iostream>
using namespace std;
int main() {
int x;
int i = 1;
for (;;) {
cin >> x;
if (x == 0)
break;
++i;
cout << "Case" << i << ": " << x << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
int x;
int i = 0;
for (;;) {
cin >> x;
if (x == 0)
break;
++i;
cout << "Case " << i << ": " << x << endl;
}
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 58 |
#include <iostream>
using namespace std;
int main() {
int x, i;
for (i = 1; i < 10000; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << "; " << x << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1; i <= 10000; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << ": " << x << endl;
}
return 0;
}
| [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 65 |
#include <iostream>
using namespace std;
int main() {
int x = 0, c = 1;
while (cin >> x) {
if (x) {
cout << "Case " << c << ':' << x << endl;
c++;
} else
return 0;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x = 0, c = 1;
while (cin >> x) {
if (x) {
cout << "Case " << c << ": " << x << endl;
c++;
} else
return 0;
}
return 0;
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 104], ["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 61 |
#include <iostream>
using namespace std;
int main() {
int x;
for (int i = 0; i < 10000; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i + 1 << ":" << x << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x;
for (int i = 0; i < 10000; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i + 1 << ": " << x << endl;
}
return 0;
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 66 |
#include <iostream>
using namespace std;
int main() {
long box[10001];
int i = 0;
while (1) {
cin >> box[i];
if (box[i] == 0) {
break;
}
i++;
}
for (int j = 0; j < i; j++) {
cout << "case"
<< " " << j + 1 << ":"
<< " " << box[j] << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
long box[10001];
int i = 0;
while (1) {
cin >> box[i];
if (box[i] == 0) {
break;
}
i++;
}
for (int j = 0; j < i; j++) {
cout << "Case"
<< " " << j + 1 << ":"
<< " " << box[j] << endl;
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 100 |
#include <iostream>
using namespace std;
int main() {
int N = 20000;
int number;
for (int i = 0; i < N; i++) {
cin >> number;
if (number == 0)
break;
cout << "Case " << i << ": " << number << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int N = 20000;
int number;
for (int i = 1; i < N; i++) {
cin >> number;
if (number == 0)
break;
cout << "Case " << i << ": " << number << endl;
}
return 0;
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 67 |
#include <iostream>
#include <string>
int main() {
int counter = 1;
for (std::string line; getline(std::cin, line); ++counter)
std::cout << "Case " << counter << ": " << line << std::endl;
return 0;
}
| #include <iostream>
#include <string>
int main() {
int counter = 1;
for (std::string line; getline(std::cin, line), line != "0"; ++counter)
std::cout << "Case " << counter << ": " << line << std::endl;
return 0;
}
| [["+", 0, 14, 8, 9, 0, 7, 15, 34, 0, 21], ["+", 8, 9, 0, 7, 15, 34, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 15, 34, 12, 16, 17, 79], ["+", 0, 7, 15, 34, 12, 16, 12, 5, 0, 62], ["+", 0, 7, 15, 34, 12, 16, 12, 5, 0, 6]] | 1 | 57 |
#include <cstdio>
int main() {
int n, x;
for (n = 1; n++;) {
scanf("%d", &x);
if (x == 0)
break;
else {
printf("Case %d: %d\n", n, x);
}
}
}
| #include <cstdio>
int main() {
int n, x;
for (n = 1; n <= 10000; n++) {
scanf("%d", &x);
if (x == 0)
break;
else {
printf("Case %d: %d\n", n, x);
}
}
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29]] | 1 | 58 |
#include <cstdio>
int main() {
int n;
for (int i = 0; i < 10000; i++) {
scanf("%d", &n);
if (n == 0) {
break;
}
printf("Case %d: %d\n", i, n);
}
return 0;
}
|
#include <cstdio>
int main() {
int n;
for (int i = 1; i <= 10000; i++) {
scanf("%d", &n);
if (n == 0) {
break;
}
printf("Case %d: %d\n", i, n);
}
return 0;
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 62 |
#include <cstdio>
int main() {
for (int i = 1;; i++) {
int x;
scanf("%d", &x); //入力
if (x == 0) {
break;
}
printf("Case %d; %d\n", i, x); //出力
}
return 0;
}
| #include <cstdio>
int main() {
for (int i = 1;; i++) {
int x;
scanf("%d", &x); //入力
if (x == 0) {
break;
}
printf("Case %d: %d\n", i, x); //出力
}
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 61 |
#include <iostream>
using namespace std;
int main() {
int x, y = 1;
while (y > 0) {
cin >> x;
if (x == 0)
break;
cout << "case " << y << ": " << x << endl;
y = y + 1;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x, y = 1;
while (y > 0) {
cin >> x;
if (x == 0)
break;
cout << "Case " << y << ": " << x << endl;
y = y + 1;
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 64 |
#include <iostream>
using namespace std;
int main() {
int a, x = 1;
while (1) {
cin >> a;
cin >> x;
if (a == 0) {
break;
} else if (a != 0) {
cout << "Case " << x << ": " << a << endl;
}
x = x + 1;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a, x = 1;
while (1) {
cin >> a;
if (a == 0) {
break;
} else if (a != 0) {
cout << "Case " << x << ": " << a << endl;
}
x = x + 1;
}
return 0;
}
| [["-", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 77 |
#include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1; i <= 10000; ++i) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case" << i << ": " << x << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1; i <= 10000; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << ": " << x << endl;
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 64 |
#include <iostream>
using namespace std;
int main() {
for (int i = 1;; ++i) {
int x;
cin >> x;
if (x == 0) {
break;
}
cout << "Case" << i << ":"
<< " " << x << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
for (int i = 1;; ++i) {
int x;
cin >> x;
if (x == 0) {
break;
}
cout << "Case " << i << ":"
<< " " << x << endl;
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 65 |
#include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1; i <= 10000; i++) {
cin >> x;
if (x == 0) {
i = 10000;
} else {
cout << "Case " << i << "; " << x << endl;
}
}
}
| #include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1; i <= 10000; i++) {
cin >> x;
if (x == 0) {
i = 10000;
} else {
cout << "Case " << i << ": " << x << endl;
}
}
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 66 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int x, count = 1;
while (1) {
cin >> x;
if (x == 0)
break;
else {
printf("Case %d: %d", count, x);
count++;
}
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int x, count = 1;
while (1) {
cin >> x;
if (x == 0)
break;
else {
printf("Case %d: %d\n", count, x);
count++;
}
}
return 0;
}
| [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 62 |
#include <iostream>
using namespace std;
int main() {
int x[10000], y;
for (y = 1; y <= 10000; y++) {
cin >> x[y];
if (x[y] == 0) {
break;
}
cout << "Cese"
<< " " << y << ": " << x[y] << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x[10000], y;
for (y = 1; y <= 10000; y++) {
cin >> x[y];
if (x[y] == 0) {
break;
}
cout << "Case"
<< " " << y << ": " << x[y] << endl;
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 81 |
#include <iostream>
using namespace std;
int main() {
int a, b;
b = 1;
while (1) {
cin >> a;
if (a == 0)
break;
cout << "Case"
<< " " << b << ":"
<< " " << a << endl;
a = a + 1;
}
}
| #include <iostream>
using namespace std;
int main() {
int a, b;
b = 1;
while (1) {
cin >> a;
if (a == 0)
break;
cout << "Case"
<< " " << b << ":"
<< " " << a << endl;
b = b + 1;
}
}
| [["-", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22]] | 1 | 69 |
#include <iostream>
using namespace std;
int main() {
for (int i = 1;; i++) {
int a;
cin >> a;
if (a == 0) {
break;
} else {
cout << "Cace " << i << ": " << a << endl;
}
}
}
| #include <iostream>
using namespace std;
int main() {
for (int i = 1;; i++) {
int a;
cin >> a;
if (a == 0) {
break;
} else {
cout << "Case " << i << ": " << a << endl;
}
}
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 61 |
#include <stdio.h>
int main(void) {
int x, i;
i = 1;
while (1) {
scanf("%d", &x);
if (x == 0)
break;
printf("Case %d:%d\n", i, x);
i++;
}
return 0;
}
| #include <stdio.h>
int main(void) {
int x, i;
i = 1;
while (1) {
scanf("%d", &x);
if (x == 0)
break;
printf("Case %d: %d\n", i, x);
i++;
}
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 60 |
#include <iostream>
using namespace std;
int main() {
int i, x;
for (i = 1; i < 10001; i++) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i << " :" << x << "\n";
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int i, x;
for (i = 1; i < 10001; i++) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i << ": " << x << "\n";
}
return 0;
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 65 |
#include <iostream>
using namespace std;
int main(void) {
// Your code here!
int x;
for (int i = 0; i < 10000; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case"
<< " " << i << ":"
<< " " << x << endl;
}
}
| #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int x;
for (int i = 0; i < 10000; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case"
<< " " << i + 1 << ":"
<< " " << x << endl;
}
}
| [["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13]] | 1 | 71 |
#include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1; i <= 10000; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "case" << ' ' << i << ':' << ' ' << x << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
int x;
for (int i = 1; i <= 10000; i++) {
cin >> x;
if (x == 0) {
break;
}
cout << "Case" << ' ' << i << ':' << ' ' << x << endl;
}
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 69 |
#include <iostream>
using namespace std;
int main() {
int a = 0, b = 0, c = 0, d = 0, e = 0;
for (int i = 1; i <= 10000; i++) {
cin >> a;
if (a == 0) {
break;
}
cout << "Case" << ' ' << i + 1 << ": " << a << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a = 0, b = 0, c = 0, d = 0, e = 0;
for (int i = 1; i <= 10000; i++) {
cin >> a;
if (a == 0) {
break;
}
cout << "Case" << ' ' << i << ": " << a << endl;
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["-", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13]] | 1 | 88 |
#include <iostream>
using namespace std;
int main() {
int x, i = 1;
while (1) {
cin >> x;
if (x == 0)
break;
cout << "Case" << ' ' << i << ':' << x << endl;
i++;
}
}
| #include <iostream>
using namespace std;
int main() {
int x, i = 1;
while (1) {
cin >> x;
if (x == 0)
break;
cout << "Case" << ' ' << i << ": " << x << endl;
i++;
}
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 104], ["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 60 |
#include <iostream>
using namespace std;
int main() {
int x;
int i = 1;
while (1) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i << ": " << x << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
int x;
int i = 1;
while (1) {
cin >> x;
if (x == 0)
break;
cout << "Case " << i++ << ": " << x << endl;
}
}
| [["+", 31, 16, 31, 16, 31, 16, 12, 27, 17, 29]] | 1 | 54 |
#include <iostream>
using namespace std;
int main() {
int i = 0;
while (true) {
int x;
cin >> x;
if (x == 0) {
break;
}
cout << "case"
<< " " << i << ":"
<< " " << x << endl;
i = i + 1;
}
}
| #include <iostream>
using namespace std;
int main() {
int i = 1;
while (true) {
int x;
cin >> x;
if (x == 0) {
break;
}
cout << "Case"
<< " " << i << ":"
<< " " << x << endl;
i = i + 1;
}
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 70 |
#include <stdio.h>
int main(void) {
int i, x;
for (i = 0; i++;) {
scanf("%d", &x);
if (x == 0)
break;
printf("Case %d: %d\n", i, x);
}
return 0;
}
| #include <stdio.h>
int main(void) {
int i, x;
for (i = 1; i++;) {
scanf("%d", &x);
if (x == 0)
break;
printf("Case %d: %d\n", i - 1, x);
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 59 |
#include <cstdio>
#include <iostream>
int main() {
int buf, count;
count = 0;
while (buf != 0) {
scanf("%d", &buf);
if (buf == 0)
break;
count++;
printf("Case %d: %d\n", count, buf);
}
return 0;
}
| #include <cstdio>
#include <iostream>
int main() {
int buf, count;
count = 0;
while (true) {
scanf("%d", &buf);
if (buf == 0)
break;
count++;
printf("Case %d: %d\n", count, buf);
}
return 0;
}
| [["-", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 79], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 51, 146]] | 1 | 63 |
#include <iostream>
using namespace std;
int main() {
int x[10000], i, j;
for (i = 1; i <= 10000; i++) {
cin >> x[i];
if (x[i] == 0) {
break;
}
}
for (j = 1; j <= 10000; j++) {
if (x[j] == 0) {
break;
}
cout << "Case " << j << ":" << x[j] << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x[10000], i, j;
for (i = 1; i <= 10000; i++) {
cin >> x[i];
if (x[i] == 0) {
break;
}
}
for (j = 1; j <= 10000; j++) {
if (x[j] == 0) {
break;
}
cout << "Case " << j << ": " << x[j] << endl;
}
return 0;
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 107 |
#include <iostream>
using namespace std;
int main() {
int x = 0;
while (1) {
int a;
cin >> a;
if (a == 0) {
break;
} else {
cout << "Case " << x << ": " << a << endl;
}
x++;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int x = 1;
while (1) {
int a;
cin >> a;
if (a == 0) {
break;
} else {
cout << "Case " << x << ": " << a << endl;
}
x++;
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 65 |
#include <stdio.h>
int main(void) {
int x;
int y = 0;
while (1) {
scanf("%d\n", &x);
if (x == 0)
break;
printf("Case %d: %d", ++y, x);
}
return 0;
}
| #include <stdio.h>
int main(void) {
int x;
int y = 0;
while (1) {
scanf("%d", &x);
if (x == 0)
break;
printf("Case %d: %d\n", ++y, x);
}
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 57 |
#include <iostream>
using namespace std;
int main() {
int i = 0;
while (true) {
int x;
cin >> x;
if (x == 0)
break;
++i;
cout << "Case" << i << ": " << x << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int i = 0;
while (true) {
int x;
cin >> x;
if (x == 0)
break;
++i;
cout << "Case " << i << ": " << x << endl;
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 60 |
#include <iostream>
using namespace std;
int main() {
int i = 1;
int n;
while (true) {
cin >> n;
if (n == 0)
break;
cout << "case" << i << ":" << n << endl;
i++;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int i = 1;
int n;
while (true) {
cin >> n;
if (n == 0)
break;
cout << "Case " << i << ": " << n << endl;
i++;
}
return 0;
}
| [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 60 |
#include <iostream>
using namespace std;
int main(void) {
// Your code here!
for (int i = 1; i <= 10000; i++) {
int x;
cin >> x;
if (x == 0) {
break;
} else {
cout << "Case " << i << " " << x << endl;
}
}
}
| #include <iostream>
using namespace std;
int main(void) {
// Your code here!
for (int i = 1; i <= 10000; i++) {
int x;
cin >> x;
if (x == 0) {
break;
} else {
cout << "Case " << i << ": " << x << endl;
}
}
}
| [["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 66 |
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
int i;
i == 1;
while (1) {
int x;
cin >> x;
if (x == 0) {
break;
} else {
cout << "Case " << i << ": " << x << endl;
i++;
}
}
return 0;
}
| #include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
int i;
i = 1;
while (1) {
int x;
cin >> x;
if (x == 0) {
break;
} else {
cout << "Case " << i << ": " << x << endl;
i++;
}
}
return 0;
}
| [["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 60], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 71 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.