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 |
|---|---|---|---|---|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
char[] chars = str.toCharArray();
for (int i = 0; i < str.length(); i++) {
if ('a' <= chars[i] && chars[i] <= 'z')
chars[i] = Character.toUp... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
char[] chars = str.toCharArray();
for (int i = 0; i < str.length(); i++) {
if ('a' <= chars[i] && chars[i] <= 'z')
chars[i] = Character.toUp... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 0, 503, 49, 200, 51, 492, 3, 4, 0, 22]] | 3 | 156 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String code = sc.next();
String answer = "";
for (int i = 0; i < code.length(); i++) {
char box = code.charAt(i);
if (Character.isLowerCase(box)) {
answer += Char... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String code = sc.nextLine();
String answer = "";
for (int i = 0; i < code.length(); i++) {
char box = code.charAt(i);
if (Character.isLowerCase(box)) {
answer +=... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]] | 3 | 127 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String line = sc.next();
String answer = "";
int length = line.length();
int i;
char c;
for (i = 0; i < line.length(); i++) {
if (Character.isLowerCase(line.charAt(... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
String answer = "";
int length = line.length();
int i;
char c;
for (i = 0; i < line.length(); i++) {
if (Character.isLowerCase(line.cha... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]] | 3 | 152 |
#include <iostream>
using namespace std;
int main(int argc, const char *argv[]) {
int n, m, l;
cin >> n >> m >> l;
//行列A
int matrixA[100][100] = {0, 0};
//行列B
int matrixB[100][100] = {0, 0};
//行列C
long long matrixC[100][100] = {0, 0};
//----------------------------------------------
//行列A-格納
for (... | #include <iostream>
using namespace std;
int main(int argc, const char *argv[]) {
int n, m, l;
cin >> n >> m >> l;
//行列A
int matrixA[100][100] = {0, 0};
//行列B
int matrixB[100][100] = {0, 0};
//行列C
long long matrixC[100][100] = {0, 0};
//----------------------------------------------
//行列A-格納
for (... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 312 |
#include <iostream>
using namespace std;
int main() {
int n, m, l;
long long A[100][100], B[100][100], C[100][100];
cin >> n >> m >> l;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {
cin >... | #include <iostream>
using namespace std;
int main() {
int n, m, l;
long long A[100][100], B[100][100], C[100][100];
cin >> n >> m >> l;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {
cin ... | [["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["+", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 7, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 276 |
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
constexpr int MAX = 100;
int main() {
int in_mat1_row, in_mat1_col, in_mat2_row, in_mat2_col;
cin >> in_mat2_row >> in_mat1_col >> in_mat1_col;
in_mat2_row = in_mat1_col;
int in_mat1[MAX][MAX];
for (int i = 0; i < in_mat1_row; i++) {
... | #include <iostream>
using std::cin;
using std::cout;
using std::endl;
constexpr int MAX = 100;
int main() {
int in_mat1_row, in_mat1_col, in_mat2_row, in_mat2_col;
cin >> in_mat1_row >> in_mat1_col >> in_mat2_col;
in_mat2_row = in_mat1_col;
int in_mat1[MAX][MAX];
for (int i = 0; i < in_mat1_row; i++) {
... | [["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 274 |
#include <iostream>
using namespace std;
int main() {
int n, m, l, A[100][100] = {0}, B[100][100] = {0}, C[100][100] = {0}, i, j, k;
cin >> n >> m >> l;
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++)
cin >> A[i][j];
}
for (i = 0; i < m; i++) {
for (j = 0; j < l; j++)
cin >> B[i][j];
... | #include <iostream>
using namespace std;
int main() {
int n, m, l;
long A[100][100] = {0}, B[100][100] = {0}, C[100][100] = {0}, i, j, k;
cin >> n >> m >> l;
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++)
cin >> A[i][j];
}
for (i = 0; i < m; i++) {
for (j = 0; j < l; j++)
cin >> B[i... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 277 |
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
int main(void) {
int N, M, L;
cin >> N >> M >> L;
long long matA[100][100] = {0};
long long matB[100][100] = {0};
long long matC[100][100] = {0};
for (int i = 0; i < N; i++) {
for (int j =... | #include <cctype>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
int main(void) {
int N, M, L;
cin >> N >> M >> L;
long long matA[100][100] = {0};
long long matB[100][100] = {0};
long long matC[100][100] = {0};
for (int i = 0; i < N; i++) {
for (int j =... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 295 |
#include <stdio.h>
int main() {
int x, y, z, zz;
double w;
int p[100][100];
int q[100][100];
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 100; j++) {
p[i][j] = 0;
q[i][j] = 0;
}
}
scanf("%d", &x);
scanf("%d", &y);
scanf("%d", &z);
for (int i = 0; i < x; i++) {
for (int... | #include <stdio.h>
int main() {
int x, y, z, zz;
long w;
int p[100][100];
int q[100][100];
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 100; j++) {
p[i][j] = 0;
q[i][j] = 0;
}
}
scanf("%d", &x);
scanf("%d", &y);
scanf("%d", &z);
for (int i = 0; i < x; i++) {
for (int j... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 337 |
#include <iostream>
using namespace std;
int main() {
int n, m, l;
long long a[100][100], b[100][100], c[100][100];
cin >> n >> m >> l;
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 100; j++) {
a[i][j] = 0;
b[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < ... | #include <iostream>
using namespace std;
int main() {
int n, m, l;
long long a[100][100], b[100][100], c[100][100];
cin >> n >> m >> l;
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 100; j++) {
a[i][j] = 0;
b[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 300 |
#include <iostream>
using namespace std;
int main() {
int a[100][100] = {0}, b[100][100] = {0};
long sum = 0;
int n, m, l;
cin >> n >> m >> l;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {
... |
#include <iostream>
using namespace std;
int main() {
int a[100][100] = {0}, b[100][100] = {0};
long sum = 0;
int n, m, l;
cin >> n >> m >> l;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {... | [["+", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 234 |
#include <iostream>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
int a[101][101] = {};
int b[101][101] = {};
long c[101][101] = {};
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j... |
#include <iostream>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
int a[101][101] = {};
int b[101][101] = {};
long c[101][101] = {};
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 282 |
#include <stdio.h>
int n, m, l, a[100][100], b[100][100];
int main() {
scanf("%d%d%d", &n, &m, &l);
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
scanf("%d", &a[i][j]);
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {
scanf("%d", &b[i][j]);
}
}
for (i... | #include <stdio.h>
int n, m, l, a[100][100], b[100][100];
int main() {
scanf("%d%d%d", &n, &m, &l);
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
scanf("%d", &a[i][j]);
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {
scanf("%d", &b[i][j]);
}
}
for (i... | [["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 57, 64, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 2, 63, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22]] | 1 | 242 |
#include <iostream>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
int A[100][100] = {};
int B[100][100] = {};
int C[100][100] = {};
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < ... | #include <iostream>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
int A[100][100] = {};
int B[100][100] = {};
long int C[100][100] = {};
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0;... | [["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22], ["-", 12, 16, 12, 69, 28, 69, 341, 342, 0, 22], ["+", 12, 16, 12, 69, 28, 69, 341, 342, 0, 22]] | 1 | 251 |
#include <iostream>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
long long a[100][100], b[100][100];
long c[100][100];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {
c... | #include <iostream>
using namespace std;
int main() {
int n, m, l;
cin >> n >> m >> l;
long long a[100][100];
long long b[100][100];
long c[100][100];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 281 |
#include <iostream>
using namespace std;
int main(void) {
int n, m, l, a[101][101], b[101][101], ans[101][101] = {0};
cin >> n >> m >> l;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {
cin >> ... | #include <iostream>
using namespace std;
int main(void) {
int n, m, l, a[101][101], b[101][101];
long long ans[101][101] = {0};
cin >> n >> m >> l;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int i = 0; i < m; i++) {
for (int j = 0; j < l; j++) {
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22], ["+", 0, 11, 12, 16, 31, 69, 341, 342, 0, 22], ["+", 31, 16, 12, 69, 341, 342, 0, 16, 17, 33], ["+", 31, 16, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 275 |
#include <iostream>
using namespace std;
int a[101][101] = {};
int b[101][101] = {};
int ans[101][101] = {};
int main() {
int n, m, l;
cin >> n >> m >> l;
// A
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
// B
for (int i = 0; i < m; i++) {
for (int j... | #include <iostream>
using namespace std;
int a[101][101] = {};
int b[101][101] = {};
long ans[101][101] = {};
int main() {
int n, m, l;
cin >> n >> m >> l;
// A
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
// B
for (int i = 0; i < m; i++) {
for (int ... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 299 |
#include <stdio.h>
int main() {
char c;
while (1) {
scanf("%c", &c);
if (c == '\n')
printf("\n");
break;
if ('A' <= c && c <= 'Z')
c += 32;
else if ('a' <= c && c <= 'z')
c -= 32;
printf("%c", c);
}
return 0;
}
| #include <stdio.h>
int main() {
char c;
while (1) {
scanf("%c", &c);
if (c == '\n') {
printf("\n");
break;
}
if ('A' <= c && c <= 'Z')
c += 32;
else if ('a' <= c && c <= 'z')
c -= 32;
printf("%c", c);
}
return 0;
}
| [["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 46]] | 0 | 93 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char *S;
int len = 0;
int i;
S = (char *)malloc(10000);
scanf("%s", S);
while (S[len]) {
len++;
}
for (i = 0; i < len; i++) {
if ('a' <= S[i] && S[i] <= 'z') {
S[i] += 'A' - 'a';
} else ... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char *S;
int len = 0;
int i;
S = (char *)malloc(10000);
scanf("%[^\n]", S);
while (S[len]) {
len++;
}
for (i = 0; i < len; i++) {
if ('a' <= S[i] && S[i] <= 'z') {
S[i] += 'A' - 'a';
} e... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 187 |
#include <stdio.h>
int main(void) {
char c;
while (1) {
scanf("%c", &c);
if ('A' <= c && c <= 'Z') {
c = c + 32;
} else if ('a' <= c && c <= 'z') {
c = c - 32;
}
printf("%c", c);
if (c = '\n')
break;
}
return 0;
}
| #include <stdio.h>
int main(void) {
char c;
while (1) {
scanf("%c", &c);
if ('A' <= c && c <= 'Z') {
c = c + 32;
} else if ('a' <= c && c <= 'z') {
c = c - 32;
}
printf("%c", c);
if (c == '\n') {
break;
}
}
return 0;
}
| [["-", 8, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 46]] | 0 | 95 |
// 大文字と小文字変換
#include <stdio.h>
#include <string.h>
int main(void) {
int i;
char str[1200];
fgets(str, 1200,
stdin); // scanf だとスペース入力以降の文字を読み込んでくれない
for (i = 0; i <= strlen(str); i++) {
if (str[i] >= 97 && str[i] <= 122) // 小文字だったら
str[i] = str[i] - 32;
if (str[i] >= 65 && str[i] <= 9... | // 大文字と小文字変換
#include <stdio.h>
#include <string.h>
int main(void) {
int i;
char str[1200];
fgets(str, 1200,
stdin); // scanf だとスペース入力以降の文字を読み込んでくれない
for (i = 0; i <= strlen(str); i++) {
if (str[i] >= 97 && str[i] <= 122) // 小文字だったら
str[i] = str[i] - 32;
else if (str[i] >= 65 && str[i]... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]] | 0 | 119 |
#include <stdio.h>
#define NUM 1200
int main(void) {
char str1[NUM];
int i, j;
scanf("%s", str1);
for (i = 0; i < NUM; i++) {
if ('a' <= str1[i] && str1[i] <= 'z')
str1[i] = str1[i] - 32;
else if ('A' <= str1[i] && str1[i] <= 'Z')
str1[i] = str1[i] + 32;
}
printf("%s\n", str1);
return... | #include <stdio.h>
#define NUM 1200
int main(void) {
char str1[NUM];
int i, j;
gets(str1);
for (i = 0; i < NUM; i++) {
if ('a' <= str1[i] && str1[i] <= 'z')
str1[i] = str1[i] - 32;
else if ('A' <= str1[i] && str1[i] <= 'Z')
str1[i] = str1[i] + 32;
}
printf("%s\n", str1);
return 0;
} | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21]] | 0 | 125 |
#include <ctype.h>
#include <stdio.h>
int main(void) {
char ch;
while (1) {
scanf("%c", &ch);
if (ch == '\n') {
break;
}
if (islower(ch) == 1) {
ch = toupper(ch);
printf("%c", ch);
} else if (isupper(ch) == 1) {
ch = tolower(ch);
printf("%c", ch);
} else {
... | #include <ctype.h>
#include <stdio.h>
int main(void) {
char ch;
while (1) {
scanf("%c", &ch);
if (ch == '\n') {
break;
}
if (islower(ch)) {
ch = toupper(ch);
printf("%c", ch);
} else if (isupper(ch)) {
ch = tolower(ch);
printf("%c", ch);
} else {
printf... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 60], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 119 |
#include <stdio.h>
#include <string.h>
int main() {
int i;
char str[1200];
size_t len;
scanf("%s", str);
len = strlen(str);
for (i = 0; i < len; i++) {
if ((str[i] >= 65) && (str[i] <= 90)) {
str[i] += 32;
} else if ((str[i] >= 97) && (str[i]) <= 122) {
str[i] -= 32;
}
}
pr... | #include <stdio.h>
#include <string.h>
int main() {
int i;
char str[1200];
size_t len;
scanf("%[^\n]", str);
len = strlen(str);
for (i = 0; i < len; i++) {
if ((str[i] >= 65) && (str[i] <= 90)) {
str[i] += 32;
} else if ((str[i] >= 97) && (str[i]) <= 122) {
str[i] -= 32;
}
}
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 125 |
#include <ctype.h>
#include <stdio.h>
#include <string.h>
int main(void) {
char str[1201];
int i;
scanf("%s", str);
for (i = 0; str[i] != EOF; i++) {
if (str[i] >= 'A' && str[i] <= 'Z')
str[i] = tolower(str[i]);
else if (str[i] >= 'a' && str[i] <= 'z')
str[i] = toupper(str[i]);
}
printf(... | #include <ctype.h>
#include <stdio.h>
#include <string.h>
int main(void) {
char str[1201];
int i;
gets(str);
for (i = 0; str[i] != EOF; i++) {
if (str[i] >= 'A' && str[i] <= 'Z')
str[i] = tolower(str[i]);
else if (str[i] >= 'a' && str[i] <= 'z')
str[i] = toupper(str[i]);
}
printf("%s\n",... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21]] | 0 | 129 |
#include <stdio.h>
int main(void) {
int i;
char ch;
char str[1200];
for (i = 0; i < 1200; i++) {
scanf("%c", &ch);
if (65 <= ch && ch <= 90)
ch += 32;
else if (97 <= ch && ch <= 122)
ch -= 32;
else
str[i] = ch;
if (ch == '\n') {
str[i + 1] = '\0';
break;
}
... | #include <stdio.h>
int main(void) {
int i;
char ch;
char str[1200];
for (i = 0; i < 1200; i++) {
scanf("%c", &ch);
if (65 <= ch && ch <= 90)
ch += 32;
else if (97 <= ch && ch <= 122)
ch -= 32;
str[i] = ch;
if (ch == '\n') {
str[i + 1] = '\0';
break;
}
}
print... | [["-", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95]] | 0 | 118 |
#include <ctype.h>
#include <stdio.h>
int main(void) {
int i = 0;
char str[1210];
scanf("%s", str);
while (str[i]) {
if (islower(str[i]))
str[i] = toupper(str[i]);
else if (isupper(str[i]))
str[i] = tolower(str[i]);
i++;
}
printf("%s\n", str);
return 0;
} | #include <ctype.h>
#include <stdio.h>
int main(void) {
int i = 0;
char str[1210];
gets(str);
while (str[i]) {
if (islower(str[i]))
str[i] = toupper(str[i]);
else if (isupper(str[i]))
str[i] = tolower(str[i]);
i++;
}
printf("%s\n", str);
return 0;
} | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21]] | 0 | 103 |
#include <stdio.h>
int main(void) {
char string[1200];
int i = 0;
scanf("%[^\r\n]", string);
while (string[i] != '\n') {
if (string[i] >= 65 && string[i] <= 90)
string[i++] += 32;
else if (string[i] >= 97 && string[i] <= 122)
string[i++] -= 32;
else
i++;
}
printf("%s\n", string... | #include <stdio.h>
int main(void) {
char string[1800];
int i = 0;
scanf("%[^\r\n]", string);
while (string[i] != '\0') {
if (string[i] >= 65 && string[i] <= 90)
string[i++] += 32;
else if (string[i] >= 97 && string[i] <= 122)
string[i++] -= 32;
else
i++;
}
printf("%s\n", string... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 52, 15, 23, 0, 16, 12, 103, 0, 44], ["+", 0, 52, 15, 23, 0, 16, 12, 103, 0, 44]] | 0 | 111 |
#include <stdio.h>
int main() {
int ch;
for (;;) {
ch = getchar();
if (ch == EOF) {
break;
}
if (islower(ch)) {
ch = tolower(ch);
} else if (islower(ch)) {
ch = toupper(ch);
}
putchar(ch);
}
return 0;
} | #include <stdio.h>
int main() {
int ch;
for (;;) {
ch = getchar();
if (ch == EOF) {
break;
}
if (isupper(ch)) {
ch = tolower(ch);
} else if (islower(ch)) {
ch = toupper(ch);
}
putchar(ch);
}
return 0;
} | [["-", 8, 9, 0, 57, 15, 23, 0, 2, 63, 22], ["+", 8, 9, 0, 57, 15, 23, 0, 2, 63, 22]] | 0 | 75 |
#include <stdio.h>
int main(void) {
char str[1200];
int i;
scanf("%s", str);
i = 0;
while (str[i] != '\0') {
if ('a' <= str[i] && str[i] <= 'z')
putchar(str[i] - 'a' + 'A');
else if ('A' <= str[i] && str[i] <= 'Z')
putchar(str[i] - 'A' + 'a');
else
putchar(str[i]);
i++;
... | #include <stdio.h>
int main(void) {
char str[1200];
int i;
gets(str);
i = 0;
while (str[i] != '\0') {
if ('a' <= str[i] && str[i] <= 'z')
putchar(str[i] - 'a' + 'A');
else if ('A' <= str[i] && str[i] <= 'Z')
putchar(str[i] - 'A' + 'a');
else
putchar(str[i]);
i++;
}
pu... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21]] | 0 | 138 |
#include <ctype.h>
#include <stdio.h>
int main(void) {
char s[1200];
int i;
scanf("%s", s);
for (i = 0; i < 1200; i++) {
if (s[i] != toupper(s[i]))
s[i] = toupper(s[i]);
else
s[i] = tolower(s[i]);
}
printf("%s\n", s);
return 0;
} | #include <ctype.h>
#include <stdio.h>
int main(void) {
char s[1200];
int i;
gets(s);
for (i = 0; i < 1200; i++) {
if (s[i] != toupper(s[i]))
s[i] = toupper(s[i]);
else
s[i] = tolower(s[i]);
}
printf("%s\n", s);
return 0;
} | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21]] | 0 | 99 |
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char words[1200];
//??????????????\???
fgets(words, sizeof(words), stdin);
int i;
//????????°???????????????
int cnt = 0;
for (i = 0; i < strlen(words); i++) {
//??§?????????????°??????????????°????????????... | #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char words[1200];
//??????????????\???
fgets(words, sizeof(words), stdin);
int i;
//????????°???????????????
int cnt = 0;
for (i = 0; i < strlen(words); i++) {
//??§?????????????°??????????????°????????????... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 20], ["-", 0, 57, 15, 23, 0, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 23, 0, 16, 12, 103, 0, 125], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 20], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 19], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 128 |
#include <ctype.h>
#include <stdio.h>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isupper(ch) == 1) {
ch = tolower(ch);
printf("%c", ch);
} else if (islower(ch) == 1) {
ch = toupper(ch);
printf("%c", ch);
} else {
printf("%c", ch);
}
if (ch == '\... | #include <ctype.h>
#include <stdio.h>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isupper(ch) == 0) {
ch = toupper(ch);
printf("%c", ch);
} else if (islower(ch) == 0) {
ch = tolower(ch);
printf("%c", ch);
} else {
printf("%c", ch);
}
if (ch == '\... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["-", 64, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 109 |
#include <ctype.h>
#include <stdio.h>
int main() {
char str[1200];
char c;
int i = 0;
while (1) {
scanf("%c", &c);
if (c == '.')
break;
if (isupper(c))
str[i] = tolower(c);
else {
str[i] = toupper(c);
}
i++;
}
str[i] = '\0';
printf("%s\n", str);
return 0;
} | #include <ctype.h>
#include <stdio.h>
int main() {
char str[1200];
char c;
int i = 0;
while (1) {
scanf("%c", &c);
if (c == '\n')
break;
if (isupper(c))
str[i] = tolower(c);
else {
str[i] = toupper(c);
}
i++;
}
str[i] = '\0';
printf("%s\n", str);
return 0;
} | [["-", 0, 57, 15, 23, 0, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 23, 0, 16, 12, 103, 0, 44]] | 0 | 105 |
#include <stdio.h>
#include <string.h>
int main(int argc, const char *argv[]) {
int i;
long int j;
char s[1201];
char a[27] = "abcdefghijklmnopqrstuvwxyz";
char A[27] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
long int len;
scanf("%s", s);
len = strlen(s);
for (j = 0; j < len; j++) {
for (i = 0; i < 26; i++)... | #include <stdio.h>
#include <string.h>
int main(int argc, const char *argv[]) {
int i;
long int j;
char s[1201];
char a[27] = "abcdefghijklmnopqrstuvwxyz";
char A[27] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
long int len;
gets(s);
len = strlen(s);
for (j = 0; j < len; j++) {
for (i = 0; i < 26; i++) {
... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21]] | 0 | 173 |
#include <stdio.h>
int main(void) {
char c;
while ((c = getchar()) != '\n') {
if ((c >= 'A') && (c <= 'Z')) {
c += 'a' - 'A';
} else if ((c >= 'a') && (c <= 'Z')) {
c -= 'a' - 'A';
}
putchar(c);
}
printf("\n");
return 0;
} | #include <stdio.h>
int main(void) {
char c;
while ((c = getchar()) != '\n') {
if ((c >= 'A') && (c <= 'Z')) {
c += 'a' - 'A';
} else if ((c >= 'a') && (c <= 'z')) {
c -= 'a' - 'A';
}
putchar(c);
}
printf("\n");
return 0;
} | [["-", 0, 16, 12, 23, 0, 16, 12, 103, 0, 125], ["+", 0, 16, 12, 23, 0, 16, 12, 103, 0, 125]] | 0 | 104 |
#include <stdio.h>
#include <string.h>
int main(void) {
int i;
char dat[1200];
scanf("%s", &dat);
for (i = 0; i < strlen(dat); i++) {
if (dat[i] >= 65 && dat[i] <= 90) {
dat[i] += 32;
} else if (dat[i] >= 97 && dat[i] <= 122) {
dat[i] -= 32;
}
printf("%c", dat[i]);
}
printf("\... | #include <stdio.h>
#include <string.h>
int main(void) {
int i;
char dat[1200];
scanf("%[^\n]", &dat);
for (i = 0; i < strlen(dat); i++) {
if (dat[i] >= 65 && dat[i] <= 90) {
dat[i] += 32;
} else if (dat[i] >= 97 && dat[i] <= 122) {
dat[i] -= 32;
}
printf("%c", dat[i]);
}
print... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 121 |
#include <stdio.h>
#include <string.h>
int main() {
char s[1200];
int n;
scanf("%s", s);
for (n = 0; n <= strlen(s); n++) {
if (s[n] >= 97 && s[n] <= 122) {
s[n] = s[n] - 32;
} else if (s[n] >= 65 && s[n] <= 90) {
s[n] = s[n] + 32;
}
}
printf("%s\n", s);
return 0;
}
| #include <stdio.h>
#include <string.h>
int main() {
char s[1200];
int n;
scanf("%[^\n]", s);
for (n = 0; n <= strlen(s); n++) {
if (s[n] >= 97 && s[n] <= 122) {
s[n] = s[n] - 32;
} else if (s[n] >= 65 && s[n] <= 90) {
s[n] = s[n] + 32;
}
}
printf("%s\n", s);
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 120 |
#include <stdio.h>
#include <string.h>
int main(void) {
char str[1200], buf;
int i;
i = 0;
while ((buf = getchar()) != '\n') {
str[i] = buf;
i++;
}
for (i = 0; i <= sizeof(str); i++) {
if (str[i] <= 122 && str[i] >= 97) {
str[i] -= 32;
} else if (str[i] <= 90 && str[i] >= 65) {
... | #include <stdio.h>
#include <string.h>
int main(void) {
char str[1200] = {'\0'}, buf;
int i;
i = 0;
while ((buf = getchar()) != '\n') {
str[i] = buf;
i++;
}
for (i = 0; i <= sizeof(str); i++) {
if (str[i] <= 122 && str[i] >= 97) {
str[i] -= 32;
} else if (str[i] <= 90 && str[i] >= 65... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 45], ["+", 0, 43, 49, 50, 51, 83, 0, 103, 0, 104], ["+", 0, 43, 49, 50, 51, 83, 0, 103, 0, 44], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 46]] | 0 | 134 |
#include <stdio.h>
#include <string.h>
int main(void) {
int i;
char str[100];
scanf("%s", str);
for (i = 0; i <= strlen(str); i++) {
if (str[i] >= 97 && str[i] <= 122) {
str[i] = str[i] - 32;
} else if (str[i] >= 65 && str[i] <= 90) {
str[i] = str[i] + 32;
} else {
str[i] = str[i]... | #include <stdio.h>
#include <string.h>
int main(void) {
int i;
char str[1200];
scanf("%[^\n]", str);
for (i = 0; i <= strlen(str); i++) {
if (str[i] >= 97 && str[i] <= 122) {
str[i] = str[i] - 32;
} else if (str[i] >= 65 && str[i] <= 90) {
str[i] = str[i] + 32;
} else {
str[i] = s... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 134 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int change = 'a' - 'A';
string str;
cin >> str;
for (int i = 0; i < str.size(); i++) {
if (str[i] >= 'A' &&
str[i] <= 'Z') // ASCIIコードではA~Z,記号,a ~ z,記号の順に並んでいる
str[i] += change;
else if (str[i] >= 'a' && str[i] <= '... | #include <iostream>
#include <string>
using namespace std;
int main() {
int change = 'a' - 'A';
string str;
getline(cin, str); //空白を含めて一行まるまる読み込む
for (int i = 0; i < str.size(); i++) {
if (str[i] >= 'A' &&
str[i] <= 'Z') // ASCIIコードではA~Z,記号,a ~ z,記号の順に並んでいる
str[i] += change;
else if (st... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 119 |
#include <cctype>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (ch == '\n') {
break;
}
if (islower(ch) == 1) {
cout << char(toupper(ch));
} else if (isupper(ch) == 1) {
cout << char(tolower(ch));
} else ... | #include <cctype>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (ch == '\n') {
break;
}
if (islower(ch)) {
cout << char(toupper(ch));
} else if (isupper(ch)) {
cout << char(tolower(ch));
} else {
co... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 104 |
#include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
if (s[i] >= 'A' && s[i] <= 'Z')
s[i] += 32;
else if (s[i] >= 'a' && s[i] <... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
getline(cin, s);
for (int i = 0; i < s.size(); i++) {
if (s[i] >= 'A' && s[i] <= 'Z')
s[i] += 32;
else if (s[i] >= 'a' &&... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 115 |
#include <cctype>
#include <cstdio>
using namespace std;
int main() {
char a;
while (1) {
a = getchar();
if (islower(a)) {
putchar(toupper(a));
} else {
putchar(tolower(a));
}
putchar(a);
if (a == '\n')
break;
}
return 0;
} | #include <cctype>
#include <cstdio>
using namespace std;
int main() {
char a;
while (1) {
a = getchar();
if (islower(a)) {
putchar(toupper(a));
} else {
putchar(tolower(a));
}
if (a == '\n')
break;
}
return 0;
} | [["-", 0, 52, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 75 |
#include <stdio.h>
using namespace std;
//---------------------------------------
void henkan(char inp[]); //?°?????????¨??§???????????\?????????
//---------------------------------------
int main(void) {
// char inp0[12] = "abcdefghijk";
char inp1[12];
// char inp2[12] = "abcdefghijk";
fgets(inp1, 12, stdin)... | #include <stdio.h>
using namespace std;
//---------------------------------------
void henkan(char inp[]); //?°?????????¨??§???????????\?????????
//---------------------------------------
int main(void) {
// char inp0[12] = "abcdefghijk";
char inp1[1201];
// char inp2[12] = "abcdefghijk";
fgets(inp1, 1201, st... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 148 |
#include <bits/stdc++.h>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", ch);
} else
printf("%c", ch);
if (ch == '\n')
break;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
if (ch == '\n')
break;
}
} | [["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 89 |
#include <stdio.h>
int main() {
char c;
while (scanf("%c", &c) != EOF) {
if (c - 'a' >= 0 && c - 'a' < 26)
c += 32;
else if (c - 'A' >= 0 && c - 'A' < 26)
c -= 32;
printf("%c", c);
}
} | #include <stdio.h>
int main() {
char c;
while (scanf("%c", &c) != EOF) {
if (c - 'a' >= 0 && c - 'a' < 26)
c -= 32;
else if (c - 'A' >= 0 && c - 'A' < 26)
c += 32;
printf("%c", c);
}
} | [["-", 8, 9, 0, 57, 64, 1, 0, 11, 17, 107], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 110], ["-", 75, 76, 0, 57, 64, 1, 0, 11, 17, 110], ["+", 75, 76, 0, 57, 64, 1, 0, 11, 17, 107]] | 1 | 81 |
#include <ctype.h>
#include <stdio.h>
int main() {
char S[1200];
int i = 0;
char ch;
while ((ch = getchar()) != EOF) {
char u_ch, l_ch;
u_ch = toupper(ch);
l_ch = tolower(ch);
if (ch != u_ch)
S[i] = u_ch;
else if (ch != l_ch)
S[i] = l_ch;
else
S[i] = ch;
}
S[i] = '\... | #include <ctype.h>
#include <stdio.h>
int main() {
char S[1200];
int i = 0;
char ch;
while ((ch = getchar()) != EOF) {
char u_ch, l_ch;
u_ch = toupper(ch);
l_ch = tolower(ch);
if (ch != u_ch)
S[i] = u_ch;
else if (ch != l_ch)
S[i] = l_ch;
else
S[i] = ch;
i++;
}
... | [["+", 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], ["-", 8, 9, 0, 1, 0, 11, 12, 103, 0, 44], ["+", 8, 9, 0, 1, 0, 11, 12, 103, 0, 44]] | 1 | 113 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char x[1201];
char a;
int j = 0;
while (1) {
a = getchar();
if (a != 32 && a < 32 || a > 125)
break;
else {
if (a >= 65 && a <= 90) {
x[j] = a + 32;
} else if (a >= 97 && a <= 122) {
x[j] = a -... | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char x[1201];
char a;
int j = 0;
while (1) {
a = getchar();
if (a != 32 && a < 32 || a > 125)
break;
else {
if (a >= 65 && a <= 90) {
x[j] = a + 32;
} else if (a >= 97 && a <= 122) {
x[j] = a -... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 142 |
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char inputStr[1200] = {'\0'};
cin >> inputStr;
int length = strlen(inputStr);
for (int i = 0; i < length; i++) {
if (inputStr[i] >= 'a' && inputStr[i] <= 'z') {
inputStr[i] += 'A' - 'a';
} else if (inputStr[i] >= 'A' && input... | #include <cstring>
#include <iostream>
using namespace std;
int main() {
char inputStr[1200] = {'\0'};
cin.getline(inputStr, 1200);
int length = strlen(inputStr);
for (int i = 0; i < length; i++) {
if (inputStr[i] >= 'a' && inputStr[i] <= 'z') {
inputStr[i] += 'A' - 'a';
} else if (inputStr[i] >= ... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 139 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string str;
getline(cin, str);
for (int i = 0; i < (int)str.size(); i++) {
if (islower(str[i])) {
str[i] = toupper(str[i]);
}
if (isupper(str[i])) {
str[i] = tolower(str[i]);
}
}
cout << str << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
getline(cin, str);
for (int i = 0; i < (int)str.size(); i++) {
if (islower(str[i])) {
str[i] = toupper(str[i]);
} else if (isupper(str[i])) {
str[i] = tolower(str[i]);
}
}
cout << str << endl;
return 0;
}
| [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 104 |
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
for (int j = -34; j < 100; j++) {
if (s[i] == ('A' + j)) {
if (123 > 'A' + j && 'A' + j > 96) {
cout << (char)('A' + j - 32);
} else if (64 < 'A' + j && 'A' + j < 91) ... | #include <iostream>
using namespace std;
int main() {
string s;
getline(cin, s);
for (int i = 0; i < s.size(); i++) {
for (int j = -34; j < 100; j++) {
if (s[i] == ('A' + j)) {
if (123 > 'A' + j && 'A' + j > 96) {
cout << (char)('A' + j - 32);
} else if (64 < 'A' + j && 'A' + j... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 166 |
#include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
while (true) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch)) {
printf("%c", tolower(ch));
} else if (isupper(ch)) {
printf("%c", toupper(ch));
}
} else {
... | #include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
while (true) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch)) {
printf("%c", toupper(ch));
} else if (isupper(ch)) {
printf("%c", tolower(ch));
}
} else {
... | [["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22]] | 1 | 109 |
#include <cstdio>
int main() { //受け取る文字列の最大の長さ+1の配列を用意する
char s[1201];
scanf("%[^\n]", s);
//ヌル文字に遭遇するまでループする
for (int i = 0; s[i] != '\0'; i++) {
// i番目の文字
char c = s[i];
if (c >= 65 && c <= 90) {
s[i] = c + 32;
}
else if (c >= 97 && c <= 122) {
s[i] = c - 32;
}
prin... | #include <cstdio>
int main() { //受け取る文字列の最大の長さ+1の配列を用意する
char s[1201];
scanf("%[^\n]", s);
//ヌル文字に遭遇するまでループする
for (int i = 0; s[i] != '\0'; i++) {
// i番目の文字
char c = s[i];
if (c >= 65 && c <= 90) {
s[i] = c + 32;
}
else if (c >= 97 && c <= 122) {
s[i] = c - 32;
}
}
pr... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 109 |
#include <cstdio>
int main() {
char s[1201]; //ヌル文字の分を加えなくちゃいけないから+1
scanf("%[^\n]", s);
for (int i = 0; s[i] != '\0'; i++) {
char c = s[i];
if (c >= 65 && c <= 90) {
s[i] = c + 32;
} else if (c >= 97 && c <= 122) {
s[i] = c - 32;
}
}
//出力
printf("%[^\n]", s);
}
| #include <cstdio>
int main() {
char s[1201]; //ヌル文字の分を加えなくちゃいけないから+1
scanf("%[^\n]", s);
for (int i = 0; s[i] != '\0'; i++) {
char c = s[i];
if (c >= 65 && c <= 90) {
s[i] = c + 32;
} else if (c >= 97 && c <= 122) {
s[i] = c - 32;
}
}
//出力
printf("%s\n", s);
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 110 |
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char a;
while (1) {
scanf("%c", &a);
if (isalpha(a)) {
if (islower(a))
cout << toupper(a);
else if (isupper(a))
cout << tolower(a);
} else {
cout << a;
}
if (a == '\n')
break;
}
... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
char a;
while (1) {
scanf("%c", &a);
if (isalpha(a)) {
if (islower(a))
cout << (char)toupper(a);
else if (isupper(a))
cout << (char)tolower(a);
} else {
cout << a;
}
if (a == '\n')
br... | [["+", 0, 57, 64, 1, 0, 16, 12, 74, 0, 24], ["+", 64, 1, 0, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 57, 64, 1, 0, 16, 12, 74, 0, 25]] | 1 | 91 |
#include <iostream>
using namespace std;
int main() {
char a[1200];
cin.getline(a, 1200);
for (int i = 0; i < 1200; i++) {
if ('a' <= a[i] && a[i] <= 'z') {
a[i] = a[i] - 32;
}
if ('A' <= a[i] && a[i] <= 'Z')
a[i] = a[i] + 32;
}
cout << a << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
char a[1200];
cin.getline(a, 1200);
for (int i = 0; i < 1200; i++) {
if ('a' <= a[i] && a[i] <= 'z') {
a[i] = a[i] - 32;
} else if ('A' <= a[i] && a[i] <= 'Z') {
a[i] = a[i] + 32;
}
}
cout << a << endl;
return 0;
}
| [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 75, 76, 0, 57, 64, 9, 0, 46]] | 1 | 118 |
#include <iostream>
#include <string>
using namespace std;
int main(void) {
int i = 0, j = 32;
string str = "";
cin >> str;
int str_len = str.size();
while (1) {
if (i == str_len) {
break;
}
// cout<<(int)str[i];
if ((int)str[i] >= (int)'a' && (int)str[i] <= (int)'z') {
cout << (c... | #include <iostream>
#include <string>
using namespace std;
int main(void) {
int i = 0, j = 32;
string str = "";
getline(cin, str);
int str_len = str.size();
while (1) {
if (i == str_len) {
break;
}
// cout<<(int)str[i];
if ((int)str[i] >= (int)'a' && (int)str[i] <= (int)'z') {
cou... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 173 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string mozi;
getline(cin, mozi);
for (int i = 0; (int)mozi.size(); i++) {
if (islower(mozi[i])) {
mozi[i] = toupper(mozi[i]);
} else if (isupper(mozi[i])) {
mozi[i] = tolower(mozi[i]);
}
}
cout << mozi << endl;
return 0... | #include <bits/stdc++.h>
using namespace std;
int main() {
string mozi;
getline(cin, mozi);
for (int i = 0; i < (int)mozi.size(); i++) {
if (islower(mozi[i])) {
mozi[i] = toupper(mozi[i]);
} else if (isupper(mozi[i])) {
mozi[i] = tolower(mozi[i]);
}
}
cout << mozi << endl;
retu... | [["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]] | 1 | 103 |
print(input().capitalize())
| print(input().swapcase())
| [["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22]] | 5 | 10 |
text = input()
for i in range(len(text)):
code = ord(text[i])
if ord('A') <= code <= ord('Z'):
result += chr(code + 32)
elif ord('a') <= code <= ord('z'):
result += chr(code - 32)
else:
result += chr(code)
print(result) | text = input()
result = ''
for i in range(len(text)):
code = ord(text[i])
if ord('A') <= code <= ord('Z'):
result += chr(code + 32)
elif ord('a') <= code <= ord('z'):
result += chr(code - 32)
else:
result += chr(code)
print(result) | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 654], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 655]] | 5 | 87 |
print(( sys.stdin.readline().rstrip().swapcase() )) | import sys
print(( sys.stdin.readline().rstrip().swapcase() )) | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]] | 5 | 20 |
print(( sys.stdin.readline().rstrip().swapcase() )) | import sys
print( sys.stdin.readline().rstrip().swapcase() ) | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 23, 0, 652, 3, 4, 0, 25]] | 5 | 20 |
s = input()
print(s.swapcase) | s = input()
print(s.swapcase()) | [["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 11 |
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
int d;
while (1) {
scanf("%c", &ch);
d = ch;
if ((d >= 65) && (d <= 96)) {
d = d + 32;
} else if ((d > 96) && (d <= 122)) {
d = d - 32;
}
if (ch == '\n') {
break;
} else {
printf("... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
char ch;
int d;
while (1) {
scanf("%c", &ch);
d = ch;
if ((d >= 65) && (d <= 96)) {
d = d + 32;
} else if ((d > 96) && (d <= 122)) {
d = d - 32;
}
if (ch == '\n') {
break;
} else {
printf("... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 119 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
string x;
cin >> x;
for (int i = 0; i < x.size(); i++) {
if ('a' <= x[i] && x[i] <= 'z')
cout << (char)(x[i] +... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {
string x;
getline(cin, x);
for (int i = 0; i < x.size(); i++) {
if ('a' <= x[i] && x[i] <= 'z')
cout << (char)... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 153 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string m;
getline(cin, m);
for (int i = 0; i < (int)m.size(); i++) {
if (m[i] > 'A' && m[i] < 'Z') {
m[i] -= ('A' - 'a');
} else if (m[i] > 'a' && m[i] < 'z') {
m[i] += ('A' - 'a');
}
}
cout << m;
cout << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string m;
getline(cin, m);
for (int i = 0; i < (int)m.size(); i++) {
if (m[i] >= 'A' && m[i] <= 'Z') {
m[i] -= ('A' - 'a');
} else if (m[i] >= 'a' && m[i] <= 'z') {
m[i] += ('A' - 'a');
}
}
cout << m << endl;
return 0;
}
| [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22]] | 1 | 131 |
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
string a;
getline(cin, a);
for (int i = 0; i < 1200; i++) {
if (a[i] > 91 && a[i] < 63)
a[i] = a[i] + 32;
else if (a[i] > 96 && a[i] < 123)
a[i] = a[i] - 32;
}
cout << a << endl;
return 0;
}
| #include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
string a;
getline(cin, a);
for (int i = 0; i < 1200; i++) {
if (a[i] < 91 && a[i] > 64)
a[i] = a[i] + 32;
else if (a[i] > 96 && a[i] < 123)
a[i] = a[i] - 32;
}
cout << a << endl;
return 0;
}
| [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 114 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
if (s[i] >= 'a' && s[i] <= 'z')
s[i] += 'A' - 'a';
else if (s[i] >= 'A' && s[i] <= 'Z')
s[i] -= 'A' - 'a';
}
cout << s << endl;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
getline(cin, s);
for (int i = 0; i < s.size(); i++) {
if (s[i] >= 'a' && s[i] <= 'z')
s[i] += 'A' - 'a';
else if (s[i] >= 'A' && s[i] <= 'Z')
s[i] -= 'A' - 'a';
}
cout << s << endl;
}
| [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 114 |
#include <cctype>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch) == true) {
if (islower(ch) == true) {
printf("%c", toupper(ch));
} else {
printf("%c", tolower(ch));
}
/* } else i... | #include <cctype>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch)) {
printf("%c", toupper(ch));
} else {
printf("%c", tolower(ch));
}
/* } else if (ch == ' ') {
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 146], ["-", 64, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 64, 9, 0, 57, 15, 339, 51, 16, 12, 146]] | 1 | 108 |
#include <cctype>
#include <cstdio>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper);
else
printf("%c", tolower);
} else
printf("%c", ch);
if (ch == '\n')
break;
}
return 0;
}
| #include <cctype>
#include <cstdio>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
if (ch == '\n')
break;
}
return 0;
}
| [["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 87 |
#include <cstdio>;
//入出力を行う関数が使える//(scanf,printf)
#include <cctype>;
int main() {
char ch;
while (true) {
scanf("%c,&ch");
if (isalpha(ch)) {
// chがアルファベットならtrueを返す//
if (islower(ch))
printf("%c", toupper(ch));
// chが小文字ならtrueを返す// //chの大文字を返す//
else
printf("%c", to... | #include <cstdio>;
//入出力を行う関数が使える//(scanf,printf)
#include <cctype>;
int main() {
char ch;
while (true) {
scanf("%c", &ch);
if (isalpha(ch)) {
// chがアルファベットならtrueを返す//
if (islower(ch))
printf("%c", toupper(ch));
// chが小文字ならtrueを返す// //chの大文字を返す//
else
printf("%c", t... | [["-", 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], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22]] | 1 | 98 |
#include <cctype>
#include <cstdio>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower)
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else {
printf("%c", ch);
}
if (ch == '\n')
break;
}
return 0;
} | #include <cctype>
#include <cstdio>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (isalpha(ch)) {
if (islower(ch))
printf("%c", toupper(ch));
else
printf("%c", tolower(ch));
} else
printf("%c", ch);
if (ch == '\n')
break;
}
return 0;
} | [["+", 0, 57, 15, 339, 51, 2, 3, 4, 0, 24], ["+", 0, 57, 15, 339, 51, 2, 3, 4, 0, 22], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 25], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 92 |
#include <ctype.h>
#include <stdio.h>
int main() {
int i;
char s[1200];
scanf("%s", s);
for (i = 0; s[i] != '\0'; i++) {
if (isupper(s[i]))
s[i] = tolower(s[i]);
else
s[i] = toupper(s[i]);
}
printf("%s\n", s);
} | #include <ctype.h>
#include <stdio.h>
int main() {
int i;
char s[1200];
scanf("%[^\n]", s);
for (i = 0; s[i] != '\0'; i++) {
if (isupper(s[i]))
s[i] = tolower(s[i]);
else
s[i] = toupper(s[i]);
}
printf("%s\n", s);
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 95 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
cin >> str;
for (int i = 0; i < str.length(); i++) {
if (islower(str[i]))
str[i] = toupper(str[i]);
else
str[i] = tolower(str[i]);
}
cout << str << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
getline(cin, str);
for (int i = 0; i < str.length(); i++) {
if (islower(str[i]))
str[i] = toupper(str[i]);
else
str[i] = tolower(str[i]);
}
cout << str << endl;
return 0;
} | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 87 |
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
#include <numeric>
//#include <map>
using namespace std;
int main() {
char ch[1200];
memset(ch, 0, sizeof(ch));
s... | #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
#include <numeric>
//#include <map>
using namespace std;
int main() {
char ch[1200];
memset(ch, 0, sizeof(ch));
s... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 142 |
#include <cctype>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string a;
cin >> a;
// a = "fAIR, LATER, OCCASIONALLY CLOUDY.";
for (long i = 0; i < a.size(); i++) {
if (isupper(a[i]))
a[i] = tolower(a[i]);
else if (islower(a[i]))
a[i] = toupper(a... | #include <cctype>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string a;
getline(cin, a);
for (long i = 0; i < a.size(); i++) {
if (isupper(a[i]))
a[i] = tolower(a[i]);
else if (islower(a[i]))
a[i] = toupper(a[i]);
}
cout << a << endl;
retur... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 102 |
#include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (islower(ch)) {
printf("%c", tolower(ch));
} else if (isupper(ch)) {
printf("%c", toupper(ch));
} else {
printf("%c", ch);
}
if (ch == '... | #include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
int main() {
char ch;
while (1) {
scanf("%c", &ch);
if (islower(ch)) {
printf("%c", toupper(ch));
} else if (isupper(ch)) {
printf("%c", tolower(ch));
} else {
printf("%c", ch);
}
if (ch == '... | [["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22]] | 1 | 98 |
#include <stdio.h>
int main() {
char a;
while (1) {
scanf("%c", &a);
if (a == '\n') {
printf("\n");
break;
}
if ('A' <= a && a <= 'Z') {
printf("%c", a + 'a' - 'A');
} else {
if ('a' <= a && a <= 'z') {
printf("%c", a - 'a' - 'A');
} else {
printf("%... | #include <stdio.h>
int main() {
char a;
while (1) {
scanf("%c", &a);
if (a == '\n') {
printf("\n");
break;
}
if ('A' <= a && a <= 'Z') {
printf("%c", a + 'a' - 'A');
} else {
if ('a' <= a && a <= 'z') {
printf("%c", a - 32);
} else {
printf("%c", a);... | [["-", 3, 4, 0, 16, 31, 16, 12, 103, 0, 104], ["-", 3, 4, 0, 16, 31, 16, 12, 103, 0, 125], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 2, 3, 4, 0, 16, 12, 103, 0, 104], ["-", 0, 2, 3, 4, 0, 16, 12, 103, 0, 125], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 127 |
#include <stdio.h>
int main() {
char a;
while (1) {
scanf("%c", &a);
if (a == '\n') {
printf("\n");
break;
}
if ('A' <= a && a <= 'Z') {
printf("%c", a + 'a' - 'A');
} else {
if ('a' <= a && a <= 'z') {
printf("%c", a - 'a' - 'A');
} else {
printf("%... | #include <stdio.h>
int main() {
char a;
while (1) {
scanf("%c", &a);
if (a == '\n') {
printf("\n");
break;
}
if ('A' <= a && a <= 'Z') {
printf("%c", a + 'a' - 'A');
} else {
if ('a' <= a && a <= 'z') {
printf("%c", a - 'a' + 'A');
} else {
printf("%... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72]] | 1 | 127 |
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
char ch, ch2;
while (1) {
scanf("%c", &ch);
if (islower(ch)) {
ch2 = tolower(ch);
cout << ch2;
} else {
ch2 = toupper(ch);
cout << ch2;
}
if (ch == '\n') {
break;
}
}
... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
char ch, ch2;
while (1) {
scanf("%c", &ch);
if (islower(ch)) {
ch2 = toupper(ch);
cout << ch2;
} else {
ch2 = tolower(ch);
cout << ch2;
}
if (ch == '\n') {
break;
}
}
... | [["-", 64, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 0, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 2, 63, 22]] | 1 | 86 |
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
// 大文字と小文字の入れ替え
func main() {
sc := bufio.NewScanner(os.Stdin)
sc.Scan()
s := sc.Text()
sr := ""
for _, x := range s {
xs := string(x)
fmt.Println(xs)
u := strings.ToUpper(xs)
l := strings.ToLower(xs)
if u == xs {
sr += l
} else if l == xs {... | package main
import (
"bufio"
"fmt"
"os"
"strings"
)
// 大文字と小文字の入れ替え
func main() {
sc := bufio.NewScanner(os.Stdin)
sc.Scan()
s := sc.Text()
sr := ""
for _, x := range s {
xs := string(x)
u := strings.ToUpper(xs)
l := strings.ToLower(xs)
if u == xs {
sr += l
} else if l == xs {
sr += u
} el... | [["-", 8, 196, 0, 1, 0, 2, 63, 438, 439, 22], ["-", 8, 196, 0, 1, 0, 2, 63, 438, 0, 131], ["-", 8, 196, 0, 1, 0, 2, 63, 438, 119, 120], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 435, 8, 196, 0, 7, 8, 196, 0, 165]] | 7 | 139 |
<?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;
} | [["-", 0, 608, 0, 563, 0, 627, 0, 606, 0, 607]] | 6 | 55 |
<?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;
} | [["+", 0, 1, 0, 564, 12, 69, 0, 606, 0, 607]] | 6 | 75 |
<?php
while (true) {
$val = str_split(trim(fgets(STDIN)));
if ($val[0] == 0) {
break;
}
echo array_sum($val);
}
| <?php
while (true) {
$val = str_split(trim(fgets(STDIN)));
if ($val[0] == 0) {
break;
}
echo array_sum($val).PHP_EOL;
}
| [["+", 0, 52, 8, 9, 0, 608, 0, 16, 17, 131], ["+", 0, 52, 8, 9, 0, 608, 0, 16, 12, 141]] | 6 | 42 |
<?php
while($a = array_sum(str_split(trim(fgets(STDIN))))) echo $a;
| <?php
while($a = array_sum(str_split(trim(fgets(STDIN))))) echo $a . PHP_EOL;
| [["+", 0, 493, 0, 52, 8, 608, 0, 16, 17, 131], ["+", 0, 493, 0, 52, 8, 608, 0, 16, 12, 141]] | 6 | 24 |
<php?
while($sum = array_sum(str_split(trim(fgets(STDIN))))) printf("%d\n", $sum);
| <?php
while($sum = array_sum(str_split(trim(fgets(STDIN))))) printf("%d\n", $sum);
| [["-", 36, 36, 36, 36, 0, 493, 0, 42, 0, 18], ["-", 36, 36, 36, 36, 0, 493, 0, 42, 0, 141], ["-", 36, 36, 36, 36, 0, 493, 0, 42, 0, 101], ["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605]] | 6 | 33 |
s=list(input())
for i in range(len(s)):
if s[i].isalnum():
if s[i].islower():
s[i]=s[i].upper()
elif s[i].isupper():
s[i]=s[i].lower()
print(str(s)) | s=list(input())
for i in range(len(s)):
if s[i].isalnum():
if s[i].islower():
s[i]=s[i].upper()
elif s[i].isupper():
s[i]=s[i].lower()
print("".join(s)) | [["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 654], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 655], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22]] | 5 | 82 |
words = eval(input())
_words = ""
for case in words:
if case != case.upper():
case = case.upper()
elif case != case.lower():
case = case.lower()
_words += case
print (_words) | words = input()
_words = ""
for case in words:
if case != case.upper():
case = case.upper()
elif case != case.lower():
case = case.lower()
_words += case
print (_words) | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 56 |
s=input();u=s.upper();l=s.lower()
print(''.join([(l[i],u[i])[s[i]==u[i]]for i in range(len(s))])) | s=input();u=s.upper();l=s.lower()
print(''.join([(u[i],l[i])[s[i]==u[i]]for i in range(len(s))])) | [["-", 0, 658, 8, 206, 51, 660, 0, 206, 51, 22], ["+", 0, 658, 8, 206, 51, 660, 0, 206, 51, 22]] | 5 | 64 |
s = input()
t = list(s)
for i in range(len(t)):
if t[i].islower() == True:
t[i] = t[i].upper()
elif t[i].isupper() == True:
t[i] = t[i].lower()
print(*t) | s = input()
t = list(s)
for i in range(len(t)):
if t[i].islower() == True:
t[i] = t[i].upper()
elif t[i].isupper() == True:
t[i] = t[i].lower()
print("".join(t)) | [["-", 0, 1, 0, 652, 3, 4, 0, 661, 0, 48], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 654], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 655], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 77 |
sen = input()
print(sen.capitalize())
| sen = input()
print(sen.swapcase())
| [["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22]] | 5 | 13 |
line = STDIN.gets.split(" ")
size = Array.new(3) { |i| i = line[i].to_i}
matrixA = []
matrixB = []
matrixC = []
# matrixA
for i in 0..size[0] - 1 do
line = STDIN.gets.split(" ")
for j in 0..size[1] - 1 do
# puts "i = #{i}, j = #{j}"
line[j] = line[j].to_i
end
matrixA << line
# print matrix
end
# prin... | line = STDIN.gets.split(" ")
size = Array.new(3) { |i| i = line[i].to_i}
matrixA = []
matrixB = []
matrixC = []
# matrixA
for i in 0..size[0] - 1 do
line = STDIN.gets.split(" ")
for j in 0..size[1] - 1 do
# puts "i = #{i}, j = #{j}"
line[j] = line[j].to_i
end
matrixA << line
# print matrix
end
# prin... | [["-", 51, 267, 0, 475, 444, 738, 31, 742, 0, 612], ["+", 51, 267, 0, 475, 444, 738, 31, 742, 0, 612]] | 4 | 235 |
n,m,l = gets.chomp.split(" ").map &:to_i
matA = Array.new
n.times { matA << (gets.chomp.split(" ").map &:to_i) }
matB = Array.new
m.times { matB << (gets.chomp.split(" ").map &:to_i) }
matC = Array.new
n.times { |r|
l.times { |c|
f = 0
m.times { |i| f += matA[r][i]*matB[i][c] }
matC << f
... | n,m,l = gets.chomp.split(" ").map &:to_i
matA = Array.new
n.times { matA << (gets.chomp.split(" ").map &:to_i) }
matB = Array.new
m.times { matB << (gets.chomp.split(" ").map &:to_i) }
matC = Array.new
n.times { |r|
l.times { |c|
f = 0
m.times { |i| f += matA[r][i]*matB[i][c] }
matC << f
... | [["-", 0, 751, 15, 738, 31, 738, 31, 738, 12, 22], ["+", 0, 751, 15, 738, 31, 738, 31, 738, 12, 22], ["-", 8, 734, 0, 751, 15, 738, 31, 738, 12, 22], ["+", 8, 734, 0, 751, 15, 738, 31, 738, 12, 22]] | 4 | 165 |
n, m, l = gets.split.map(&:to_i)
mtx_a,mtx_b = [],[]
mtx_c = Array.new(n){ Array.new(l){0} }
n.times do
mtx_a << file.gets.split.map(&:to_i)
end
m.times do
mtx_b << file.gets.split.map(&:to_i)
end
n.times do | i_idx |
m.times do | j_idx |
l.times do | k_idx |
mtx_c[i_idx][... | n, m, l = gets.split.map(&:to_i)
mtx_a,mtx_b = [],[]
mtx_c = Array.new(n){ Array.new(l){0} }
n.times do
mtx_a << gets.split.map(&:to_i)
end
m.times do
mtx_b << gets.split.map(&:to_i)
end
n.times do | i_idx |
m.times do | j_idx |
l.times do | k_idx |
mtx_c[i_idx][k_idx] += ... | [["-", 0, 738, 12, 652, 486, 652, 486, 652, 486, 22], ["-", 0, 738, 12, 652, 486, 652, 486, 652, 17, 131]] | 4 | 145 |
n, m, l = map(int, input().split(' '))
A = []
for i in range(n):
A.append(list(map(int, input().split(' '))))
B = []
for i in range(m):
B.append(list(map(int, input().split(' '))))
C = [[0 for i in range(n)] for j in range(l)]
for i in range(n):
for j in range(l):
for k in range(m):
C... | n, m, l = map(int, input().split(' '))
A = []
for i in range(n):
A.append(list(map(int, input().split(' '))))
B = []
for i in range(m):
B.append(list(map(int, input().split(' '))))
C = [[0 for i in range(l)] for j in range(n)]
for i in range(n):
for j in range(l):
for k in range(m):
... | [["-", 8, 658, 0, 659, 12, 652, 3, 4, 0, 22], ["+", 8, 658, 0, 659, 12, 652, 3, 4, 0, 22], ["-", 12, 658, 0, 659, 12, 652, 3, 4, 0, 22], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 22]] | 5 | 184 |
n,m,l = map(int,input().split())
a = [list(map(int,input().split())) for i in range(n)]
b = [list(map(int,input().split())) for i in range(m)]
for i in range(n):
for j in range(n):
sum = 0
for k in range(m):
sum += a[i][k]*b[k][j]
if j==n-1:print(sum)
else:print(sum,end="... | n,m,l = map(int,input().split())
a = [list(map(int,input().split())) for i in range(n)]
b = [list(map(int,input().split())) for i in range(m)]
for i in range(n):
for j in range(l):
sum = 0
for k in range(m):
sum += a[i][k]*b[k][j]
if j==l-1:print(sum)
else:print(sum,end="... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22]] | 5 | 137 |
n,m,l = input().split()
n = int(n)
m = int(m)
l = int(l)
matrix_A = [[0]*m for i in range(n)]
matrix_B = [[0]*n for j in range(l)]
matrix_C = [[0]*l for k in range(n)]
box_a = []
box_b = []
box_c = 0
for a in range(n):
box_a = input().split()
for b in range(m):
matrix_A[a][b] = int... | n,m,l = input().split()
n = int(n)
m = int(m)
l = int(l)
matrix_A = [[0]*m for i in range(n)]
matrix_B = [[0]*l for j in range(m)]
matrix_C = [[0]*l for k in range(n)]
box_a = []
box_b = []
box_c = 0
for a in range(n):
box_a = input().split()
for b in range(m):
matrix_A[a][b] = int... | [["-", 0, 1, 0, 662, 12, 658, 8, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 658, 8, 657, 12, 22], ["-", 12, 658, 0, 659, 12, 652, 3, 4, 0, 22], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 22]] | 5 | 242 |
n,m,l = map(int, input().split())
a = []
b = []
for i in range(n):
a.append(list(map(int, input().split())))
for j in range(m):
b.append(list(map(int, input().split())))
for k in range(n):
for o in range(l):
sum = 0
for p in range(m):
sum += a[n][m] * b[m][l]
print(sum, ... | n,m,l = map(int, input().split())
a = []
b = []
for i in range(n):
a.append(list(map(int, input().split())))
for j in range(m):
b.append(list(map(int, input().split())))
for k in range(n):
for o in range(l):
sum = 0
for p in range(m):
sum += (a[k][p] * b[p][o])
print(sum... | [["+", 8, 196, 0, 1, 0, 677, 12, 23, 0, 24], ["-", 0, 677, 12, 657, 31, 206, 51, 206, 206, 22], ["+", 12, 23, 0, 657, 31, 206, 51, 206, 206, 22], ["-", 0, 1, 0, 677, 12, 657, 31, 206, 206, 22], ["+", 0, 677, 12, 23, 0, 657, 31, 206, 206, 22], ["-", 0, 677, 12, 657, 12, 206, 51, 206, 206, 22], ["+", 12, 23, 0, 657, 12, ... | 5 | 156 |
n,m,l=map(int,input().split())
A=[list(map(int,input().split())) for i in range(n)]
B=[list(map(int,input().split())) for i in range(m)]
C=[[0]*l for i in range(n)]
for x in range(n):
for y in range(m):
for z in range(l):
C[x][y] += A[x][z]*B[z][y]
for row in range(n):
print("%d"%(C[row][0... | n,m,l=map(int,input().split())
A=[list(map(int,input().split())) for i in range(n)]
B=[list(map(int,input().split())) for i in range(m)]
C=[[0]*l for i in range(n)]
for x in range(n):
for y in range(l):
for z in range(m):
C[x][y] += A[x][z]*B[z][y]
for row in range(n):
print("%d"%(C[row][0... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22]] | 5 | 196 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.