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 | change_count int64 0 100 |
|---|---|---|---|---|---|
#include <stdio.h>
#define N 5
int main(void) {
int a[N], tmp;
for (int i = 0; i < N; i++)
scanf("%d", &a[i]);
for (int i = N - 1; i > 0; i--) {
for (int j = 0; j < i; j++) {
if (a[j] > a[j + 1]) {
tmp = a[j];
a[j] = a[j + 1];
a[j + 1] = tmp;
}
}
}
for (int i ... | #include <stdio.h>
#define N 5
int main(void) {
int a[N], tmp;
for (int i = 0; i < N; i++)
scanf("%d", &a[i]);
for (int i = N - 1; i > 0; i--) {
for (int j = 0; j < i; j++) {
if (a[j] < a[j + 1]) {
tmp = a[j];
a[j] = a[j + 1];
a[j + 1] = tmp;
}
}
}
for (int i ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 171 | 2 |
#include <bits/stdc++.h>
#include <stdint.h>
typedef uint32_t u32;
typedef uint64_t u64;
int main() {
u64 a[5];
for (u32 i = 0; i < 5; ++i) {
std::cin >> a[i];
}
std::sort(a, a + 5);
std::reverse(a, a + 5);
std::cout << a[0];
for (int i = 1; i < 5; ++i) {
std::cout << " " << a[i];
}
std::... | #include <bits/stdc++.h>
#include <stdint.h>
typedef uint32_t u32;
typedef uint64_t u64;
int main() {
int a[5];
for (u32 i = 0; i < 5; ++i) {
std::cin >> a[i];
}
std::sort(a, a + 5);
std::reverse(a, a + 5);
std::cout << a[0];
for (int i = 1; i < 5; ++i) {
std::cout << " " << a[i];
}
std::... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 120 | 2 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int num[5];
for (int i = 0; i < 5; i++) {
cin >> num[i];
}
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (num[i] <= num[j]) {
swap(num[i], num[j]);
}
}
}
cout << num[0];
for (in... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int num[5];
for (int i = 0; i < 5; i++) {
cin >> num[i];
}
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
if (num[i] >= num[j]) {
swap(num[i], num[j]);
}
}
}
cout << num[0];
for (in... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 145 | 2 |
#include <algorithm>
#include <iostream>
using namespace std;
double a[5];
int main() {
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
sort(a, a + 4);
cout << a[4] << " " << a[3] << " " << a[2] << " " << a[1] << " " << a[0]
<< " " << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
double a[5];
int main() {
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
sort(a, a + 5);
cout << a[4] << " " << a[3] << " " << a[2] << " " << a[1] << " " << a[0]
<< endl;
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 104 | 6 |
//
// main.cpp
// algorithm-practice1
//
// Created by g-2018 on 2017/04/28.
// Copyright ?? 2017??´ 3431. All rights reserved.
//
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
//****??´??????
//**** int a????????£?¨?
int a[5];
for (int i = 0; i < 5; i++) {
cin >> a[i];
... | //
// main.cpp
// algorithm-practice1
//
// Created by g-2018 on 2017/04/28.
// Copyright ?? 2017??´ 3431. All rights reserved.
//
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
//****??´??????
//**** int a????????£?¨?
int a[5];
for (int i = 0; i < 5; i++) {
cin >> a[i];
... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 104 | 2 |
#include <bits/stdc++.h>
using namespace std;
vector<string> split(string &s, char delimiter) {
vector<string> res;
int prev_split_point = 0;
for (int i = 0; i < s.length(); i++) {
while (s[i] != delimiter && i < s.length())
i++;
string add = s.substr(prev_split_point, i - prev_split_point);
if ... | #include <bits/stdc++.h>
using namespace std;
vector<string> split(string &s, char delimiter) {
vector<string> res;
int prev_split_point = 0;
for (int i = 0; i < s.length(); i++) {
while (s[i] != delimiter && i < s.length())
i++;
string add = s.substr(prev_split_point, i - prev_split_point);
if ... | [["-", 0, 11, 12, 69, 341, 342, 0, 16, 12, 13], ["+", 0, 11, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 464 | 2 |
#include <bits/stdc++.h>
using namespace std;
void f(string &s) {
for (char &c : s) {
if ('a' <= c && c <= 'z')
c = (c - 'a' + 25) % 26 + 'a';
}
}
int main() {
string s;
while (getline(cin, s)) {
if (s == "")
break;
while (s.find("the") != string::npos && s.find("this") != string::np... | #include <bits/stdc++.h>
using namespace std;
void f(string &s) {
for (char &c : s) {
if ('a' <= c && c <= 'z')
c = (c - 'a' + 25) % 26 + 'a';
}
}
int main() {
string s;
while (getline(cin, s)) {
if (s == "")
break;
while (s.find("the") == string::npos && s.find("this") == string::np... | [["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 79], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 60], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 79], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 60], ["-", 0, 52, 15, 339, 51, 16, 12, 16, 17, 79], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 60]] | 1 | 138 | 6 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
bool is_contain_keywords(string str, vector<string> &keywords) {
int cnt = 0;
vector<string>::iterator key_itr = keywords.begin();
while (key_itr != keywords.end()) {
if (str.find(*key_itr) != string::npos) {
return true;
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
bool is_contain_keywords(string str, vector<string> &keywords) {
int cnt = 0;
vector<string>::iterator key_itr = keywords.begin();
while (key_itr != keywords.end()) {
if (str.find(*key_itr) != string::npos) {
return true;
... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 17, 72],... | 1 | 297 | 8 |
#include <bits/stdc++.h>
using namespace std;
#define pb(n) push_back(n)
#define fi first
#define se second
#define np string::npos
#define X real()
#define Y imag()
#define value(x, y, w, h) (x >= 0 && x < w && y >= 0 && y < h)
#define all(r) (r).begin(), (r).end()
#define gsort(st, en) sort((st), (en), greater<int>(... | #include <bits/stdc++.h>
using namespace std;
#define pb(n) push_back(n)
#define fi first
#define se second
#define np string::npos
#define X real()
#define Y imag()
#define value(x, y, w, h) (x >= 0 && x < w && y >= 0 && y < h)
#define all(r) (r).begin(), (r).end()
#define gsort(st, en) sort((st), (en), greater<int>(... | [["-", 12, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 12, 16, 31, 2, 3, 4, 0, 5, 0, 6]] | 1 | 604 | 2 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (getline(cin, s)) {
string dec = s;
while (true) {
if (dec.find("the") != -1 || dec.find("this") != -1 ||
dec.find("that") != -1) {
cout << dec << endl;
break;
}
for (int i = ... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
while (getline(cin, s)) {
string dec = s;
while (true) {
if (dec.find("the") != -1 || dec.find("this") != -1 ||
dec.find("that") != -1) {
cout << dec << endl;
break;
}
for (int i = ... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 153 | 1 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define PUSH(n, v) ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define PUSH(n, v) ... | [["-", 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]] | 1 | 221 | 4 |
#include <stdio.h>
int check(int a, int b, int c) {
// printf("[%d][%d][%d]\n",a,b,c);
if (a != 14)
return 0;
else if (b == 23)
return 1;
else if (b == 1 && c == 10)
return 1;
else if (b == 19 && c == 19)
return 1;
else
return 0;
}
int main() {
int longth, mem = 0;
while (1) {
c... | #include <stdio.h>
int check(int a, int b, int c) {
// printf("[%d][%d][%d]\n",a,b,c);
if (a != 14)
return 0;
else if (b == 23)
return 1;
else if (b == 1 && c == 10)
return 1;
else if (b == 19 && c == 19)
return 1;
else
return 0;
}
int main() {
int longth, mem = 0;
while (1) {
c... | [["+", 0, 57, 15, 339, 51, 16, 31, 69, 28, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 70], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 513 | 5 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, j, k) for (int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for (int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
int main() {
strin... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, j, k) for (int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for (int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
int main() {
strin... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["-", 64, 1, 0, 11, 12, 16, 12, 103, 0, 104], ["-", 64, 1, 0, 11, 12, 16, 12, 103, 0, 125], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 13]] | 1 | 206 | 6 |
#include <cassert>
#include <iostream>
#include <string>
using namespace std;
bool IncludeKeyWords(const string &Sentence) {
if (Sentence.find("the") <= 80)
return true;
if (Sentence.find("this") <= 80)
return true;
if (Sentence.find("that") <= 80)
return true;
return false;
}
string OneShift(stri... | #include <cassert>
#include <iostream>
#include <string>
using namespace std;
bool IncludeKeyWords(const string &Sentence) {
if (Sentence.find("the") <= 80)
return true;
if (Sentence.find("this") <= 80)
return true;
if (Sentence.find("that") <= 80)
return true;
return false;
}
string OneShift(stri... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 1 | 240 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <ctype.h>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <utility>
#include <v... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <ctype.h>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <utility>
#include <v... | [["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 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 | 352 | 5 |
#include <cstring>
#include <iostream>
#include <string>
bool find(const std::string &text, const std::string pattern) {
int text_i = 0, pattern_i = 0;
while (text_i < text.size() && pattern_i < pattern.size()) {
if (text[text_i] == pattern[pattern_i]) {
text_i++;
pattern_i++;
} else {
pa... | #include <cstring>
#include <iostream>
#include <string>
bool find(const std::string &text, const std::string pattern) {
int text_i = 0, pattern_i = 0;
while (text_i < text.size() && pattern_i < pattern.size()) {
if (text[text_i] == pattern[pattern_i]) {
text_i++;
pattern_i++;
} else {
pa... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 106], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 266 | 6 |
#include <iostream>
#include <string>
using namespace std;
void next(string &str) {
for (int i = 0; i < str.length(); i++) {
if ('a' <= str[i] && str[i] < 'z') {
str[i] = ((str[i] - 'a' + 25) % 26) + 'a';
}
}
}
int main() {
string str;
while (getline(cin, str)) {
for (int i = 0; i < 26; ++i,... | #include <iostream>
#include <string>
using namespace std;
void next(string &str) {
for (int i = 0; i < str.length(); i++) {
if ('a' <= str[i] && str[i] <= 'z') {
str[i] = ((str[i] - 'a' + 25) % 26) + 'a';
}
}
}
int main() {
string str;
while (getline(cin, str)) {
for (int i = 0; i < 26; ++i... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]] | 1 | 174 | 2 |
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
using namespace std;
char ch;
string text;
int main() {
while (getline(cin, text)) {
for (int i = 0; i < 26; i++) {
for (int j = 0; j < text.size(); j++) {
... | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
using namespace std;
char ch;
string text;
int main() {
while (getline(cin, text)) {
for (int i = 0; i < 26; i++) {
for (int j = 0; j < text.size(); j++) {
... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 190 | 1 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string str, t;
while (getline(cin, str)) {
for (int i = 1; i < 26; ++i) {
t = str;
for (int j = 0; j < str.size(); ++j) {
if (t[j] == ' ' || t[j] == '.')
continue;
t[j] = (t[j] - 'a' + i) % 26 + 'a';
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string str, t;
while (getline(cin, str)) {
for (int i = 0; i < 26; ++i) {
t = str;
for (int j = 0; j < str.size(); ++j) {
if (t[j] == ' ' || t[j] == '.')
continue;
t[j] = (t[j] - 'a' + i) % 26 + 'a';
... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 106], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 176 | 6 |
#include <stdio.h>
#include <string.h>
int main(void) {
char data[100];
char s1[] = "the", s2[] = "this", s3[] = "that";
int i, cnt = 0;
char *p;
while ((fgets(data, 100, stdin))) {
while (cnt <= 26) {
p = strstr(data, s1);
if (p)
break;
p = strstr(data, s2);
if (p)
... | #include <stdio.h>
#include <string.h>
int main(void) {
char data[100];
char s1[] = "the", s2[] = "this", s3[] = "that";
int i, cnt = 0;
char *p;
while ((fgets(data, 100, stdin))) {
while (cnt < 26) {
p = strstr(data, s1);
if (p)
break;
p = strstr(data, s2);
if (p)
... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 215 | 4 |
#include <iostream>
#include <string>
bool NotMatch(const std::string &str) {
return str.find("the") == std::string::npos &&
str.find("this") == std::string::npos &&
str.find("that") == std::string::npos;
}
int main() {
std::string str;
while (getline(std::cin, str)) {
while (NotMatch(str)... | #include <iostream>
#include <string>
bool NotMatch(const std::string &str) {
return str.find("the") == std::string::npos &&
str.find("this") == std::string::npos &&
str.find("that") == std::string::npos;
}
int main() {
std::string str;
while (getline(std::cin, str)) {
while (NotMatch(str)... | [["-", 75, 76, 0, 9, 0, 1, 0, 27, 17, 68], ["+", 75, 76, 0, 9, 0, 1, 0, 27, 17, 29]] | 1 | 189 | 2 |
#include <algorithm>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <stack>
#include <vector>
using namespace std;
bool solve() {
string s;
while (getline(cin, s)) {
string str[26];
int num;
for (int i = 0; i < 26; i++) {
... |
#include <algorithm>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <stack>
#include <vector>
using namespace std;
bool solve() {
string s;
while (getline(cin, s)) {
string str[26];
int num;
for (int i = 0; i < 26; i++) {
... | [["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 35], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 337 | 6 |
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
string s;
while (getline(cin, s)) {
while (s.find("that") == string::npos && s.find("the") == string::npos &&
s.find("this") == string::npos) {
for (int i = 0; i < s.length(); ++i) {
if (s[i] < 'z' && s[i] >= '... | #include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
string s;
while (getline(cin, s)) {
while (s.find("that") == string::npos && s.find("the") == string::npos &&
s.find("this") == string::npos) {
for (int i = 0; i < s.length(); ++i) {
if (s[i] < 'z' && s[i] >= ... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 152 | 1 |
# coding: UTF-8
alphabets = "abcdefghijklmnopqrstuvwxyz"
while input = gets
gets.chomp!
26.times.with_index do |i|
output = input.tr("a-z", alphabets.split("").rotate(i).join)
if output =~ /th(e|is|at)/
puts output
break
end
end
end | # coding: UTF-8
alphabets = "abcdefghijklmnopqrstuvwxyz"
while input = gets
input.chomp!
26.times.with_index do |i|
output = input.tr("a-z", alphabets.split("").rotate(i).join)
if output =~ /th(e|is|at)/
puts output
break
end
end
end | [["-", 0, 493, 0, 89, 8, 170, 0, 652, 486, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 652, 486, 22]] | 4 | 59 | 2 |
#include <algorithm>
#include <iostream>
using namespace std;
int main(void) {
int a[5];
for (int i = 0; i < 5; ++i)
cin >> a[i];
sort(a, a + 5);
for (int i = 4; 0 <= i; --i)
cout << ((i != 0) ? " " : "") << a[i];
cout << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
using namespace std;
int main(void) {
int a[5];
for (int i = 0; i < 5; ++i)
cin >> a[i];
sort(a, a + 5);
for (int i = 4; 0 <= i; --i)
cout << ((i != 4) ? " " : "") << a[i];
cout << endl;
return 0;
}
| [["-", 12, 23, 0, 41, 15, 23, 0, 16, 12, 13], ["+", 12, 23, 0, 41, 15, 23, 0, 16, 12, 13]] | 1 | 94 | 2 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a[5];
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
sort(a, a + 5);
reverse(a, a + 5);
cout << a[0];
for (int j = 1; j >= 5; j++) {
cout << " " << a[j];
}
cout << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a[5];
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
sort(a, a + 5);
reverse(a, a + 5);
cout << a[0];
for (int j = 1; j < 5; j++) {
cout << " " << a[j];
}
cout << endl;
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 20], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]] | 1 | 102 | 2 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <sstream>
#include <stack>
using namespace std;
int main() {
string str;
int num[5];
for (int i = 0; i < 5; i++) {
scanf("%d", num + i);
}
sort(num, num + 5, greater<int>());
for (int i = 0; ... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <sstream>
#include <stack>
using namespace std;
int main() {
int num[5];
for (int i = 0; i < 5; i++) {
scanf("%d", num + i);
}
sort(num, num + 5, greater<int>());
for (int i = 0; i < 5; i++) {
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 2, 3, 4, 0, 41, 64, 103, 0, 104], ["+", 0, 2, 3, 4, 0, 41, 64, 5, 0, 62], ["-", 0, 2, 3, 4, 0, 41, 75, 103, 0, 104], ["+", 0, 2, 3, 4, 0, 41, 75, 5, 0, 62]] | 1 | 119 | 11 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a[5], i;
for (i = 0; i < 5; i++) {
cin >> a[i];
}
sort(a, a + 5, greater<int>());
for (i = 0; i < 5; i++) {
cout << a[i];
if (i < 3)
cout << ' ';
else
cout << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a[5], i;
for (i = 0; i < 5; i++) {
cin >> a[i];
}
sort(a, a + 5, greater<int>());
for (i = 0; i < 5; i++) {
cout << a[i];
if (i < 4)
cout << ' ';
else
cout << endl;
}
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 102 | 2 |
#include <iostream>
using namespace std;
int main() {
int a[5];
cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
for (int i = 0; i < 5; i++) {
for (int l = 0; l < 4; l++) {
if (a[l] < a[l + 1]) {
int c = a[l];
a[l] = a[l + 1];
a[l + 1] = a[l];
}
}
}
cout << a[0] << " " ... | #include <iostream>
using namespace std;
int main() {
int a[5];
cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
for (int i = 0; i < 5; i++) {
for (int l = 0; l < 4; l++) {
if (a[l] < a[l + 1]) {
int c = a[l];
a[l] = a[l + 1];
a[l + 1] = c;
}
}
}
cout << a[0] << " " << ... | [["-", 64, 9, 0, 1, 0, 11, 12, 69, 28, 22], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 70], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 73], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22]] | 1 | 173 | 5 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> lot(5);
for (int i = 0; i < 5; i++)
cin >> lot[i];
sort(lot.begin(), lot.end());
for (int i = 0; i < 5; i++) {
cout << lot[i];
if (i == 4)
cout << endl;
else
cout << " ";
}
re... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> lot(5);
for (int i = 0; i < 5; i++)
cin >> lot[i];
sort(lot.begin(), lot.end());
for (int i = 0; i < 5; i++) {
cout << lot[4 - i];
if (i == 4)
cout << endl;
else
cout << " ";
}
... | [["+", 0, 16, 12, 69, 341, 342, 0, 16, 31, 13], ["+", 0, 16, 12, 69, 341, 342, 0, 16, 17, 33]] | 1 | 104 | 2 |
#include <algorithm>
#include <array>
#include <cstdint>
#include <iostream>
#include <iterator>
int main() {
std::array<std::uint32_t, 5> numbers;
for (std::uint32_t &num : numbers) {
std::cin >> num;
}
std::sort(numbers.begin(), numbers.end(), std::greater<std::uint32_t>());
std::copy(numbers.begin(), ... | #include <algorithm>
#include <array>
#include <cstdint>
#include <iostream>
#include <iterator>
int main() {
std::array<std::int32_t, 5> numbers;
for (std::int32_t &num : numbers) {
std::cin >> num;
}
std::sort(numbers.begin(), numbers.end(), std::greater<std::int32_t>());
std::copy(numbers.begin(), num... | [["-", 141, 344, 3, 347, 0, 77, 39, 343, 141, 78], ["+", 141, 344, 3, 347, 0, 77, 39, 343, 141, 78], ["-", 0, 14, 8, 9, 0, 338, 39, 343, 141, 78], ["+", 0, 14, 8, 9, 0, 338, 39, 343, 141, 78], ["-", 141, 346, 3, 347, 0, 77, 39, 343, 141, 78], ["+", 141, 346, 3, 347, 0, 77, 39, 343, 141, 78]] | 1 | 128 | 8 |
#include <algorithm>
#include <functional>
#include <iostream>
using namespace std;
int main() {
int input[5];
for (int i = 0; i < 5; i++)
cin >> input[i];
sort(input, input + 5, greater<int>());
cout << input[0] << " " << input[1] << " " << input[2] << " " << input[3];
cout << input[4] << endl;
r... | #include <algorithm>
#include <functional>
#include <iostream>
using namespace std;
int main() {
int input[5];
for (int i = 0; i < 5; i++)
cin >> input[i];
sort(input, input + 5, greater<int>());
cout << input[0] << " " << input[1] << " " << input[2] << " " << input[3];
cout << " " << input[4] << end... | [["+", 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 | 105 | 4 |
#include <algorithm>
#include <functional>
#include <iostream>
using namespace std;
int main() {
int a[5];
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
sort(a, a + 5, greater<int>());
for (int i = 0; i < 5; i++) {
cout << a[i] << " ";
}
cout << "\b" << endl;
return 0;
} | #include <algorithm>
#include <functional>
#include <iostream>
using namespace std;
int main() {
int a[5];
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
sort(a, a + 5, greater<int>());
for (int i = 0; i < 4; i++) {
cout << a[i] << " ";
}
cout << a[4] << endl;
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 44], ["+", 0, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["+", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["+", 0, 16, 31, 16, 12, 69, 341, 342, 0, 13], ["+", 0, 16, ... | 1 | 99 | 9 |
#include <algorithm>
#include <iostream>
int main() {
int a[5];
for (int i = 0; i < 5; ++i)
std::cin >> a[i];
std::sort(a, a + 5, std::greater<int>());
std::cout << a[0];
for (int i = 1; i < 5; ++i)
std::cout << a[i];
std::cout << std::endl;
} | #include <algorithm>
#include <iostream>
int main() {
int a[5];
for (int i = 0; i < 5; ++i)
std::cin >> a[i];
std::sort(a, a + 5, std::greater<int>());
std::cout << a[0];
for (int i = 1; i < 5; ++i)
std::cout << " " << a[i];
std::cout << std::endl;
} | [["+", 8, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 8, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 7, 8, 1, 0, 16, 17, 151]] | 1 | 99 | 4 |
#include <stdio.h>
int main(void) {
int i, j, temp;
int data[5];
for (i = 0; i < 5; i++) {
scanf("%d", &data[i]);
}
for (i = 0; i < 4; i++) {
for (j = i + 1; j < 5; j++) {
if (data[i] < data[j]) {
temp = data[i];
data[i] = data[j];
data[j] = temp;
}
}
}
... | #include <stdio.h>
int main(void) {
int i, j, temp;
int data[5];
for (i = 0; i < 5; i++) {
scanf("%d", &data[i]);
}
for (i = 0; i < 4; i++) {
for (j = i + 1; j < 5; j++) {
if (data[i] < data[j]) {
temp = data[i];
data[i] = data[j];
data[j] = temp;
}
}
}
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 165 | 2 |
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
char ch[5];
for (int i = 0; i < 5; i++) {
cin >> ch[i];
}
sort(ch, ch + 4, greater<int>());
for (int i = 0; i < 4; i++) {
cout << ch[i] << " ";
}
cout << ch[4] << endl;
} | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int ch[5];
for (int i = 0; i < 5; i++) {
cin >> ch[i];
}
sort(ch, ch + 5, greater<int>());
for (int i = 0; i < 4; i++) {
cout << ch[i] << " ";
}
cout << ch[4] << endl;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 97 | 4 |
num = gets.split(&:to_i)
num = num.sort.reverse
puts num.join(" ")
| num = gets.split.map(&:to_i)
num = num.sort.reverse
puts num.join(" ")
| [["+", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]] | 4 | 25 | 2 |
puts gets.split.map(&:to_i).sort.join(" ") | puts gets.split.map(&:to_i).sort.reverse.join(" ") | [["+", 0, 652, 3, 4, 0, 652, 486, 652, 735, 22], ["+", 0, 493, 0, 652, 3, 4, 0, 652, 17, 131]] | 4 | 19 | 2 |
p gets.split.map(&:to_i).sort{|a,b| b<=>a}.join(" ") | puts gets.split.map(&:to_i).sort{|a,b| b<=>a}.join(" ") | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]] | 4 | 29 | 2 |
str = STDIN.gets
nums = str.split(" ")
nums.map(&:to_i)
nums = nums.sort {|a, b| b <=> a }
puts nums.join(" ") | str = STDIN.gets
nums = str.split(" ")
nums.map!(&:to_i)
nums = nums.sort {|a, b| b <=> a }
puts nums.join(" ") | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]] | 4 | 46 | 2 |
while gets
a = $_.split(" ").map{|val| val.to_i}
a.sort!
for i in 0...a.size
print " " if i != 0
print a[i]
end
puts
end | while gets
a = $_.split(" ").map{|val| val.to_i}
a.sort!.reverse!
for i in 0...a.size
print " " if i != 0
print a[i]
end
puts
end | [["+", 0, 493, 0, 89, 8, 170, 0, 652, 17, 131], ["+", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22]] | 4 | 49 | 2 |
#encoding: utf-8
arr = gets.rstrip.split(/\s/).map(&:to_i)
arr = arr.sort
puts arr.join(" ") | #encoding: utf-8
arr = gets.rstrip.split(/\s/).map(&:to_i)
arr = arr.sort.reverse
puts arr.join(" ") | [["+", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]] | 4 | 33 | 2 |
n = list(map(int, input().split()))
n.sort(revers=True)
for i in n:
print(i, end=' ')
| n = list(map(int, input().split()))
n.sort(reverse=True)
for i in n:
print(i, end=' ')
| [["-", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22]] | 5 | 40 | 2 |
while True:
try:
print("%d %d %d %d %d" % tuple(sorted(list(map(eval,input().split())))))
except EOFError: break | while True:
try:
print("%d %d %d %d %d" % tuple(sorted(list(map(eval,input().split())),reverse=True)))
except EOFError: break | [["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 3, 4, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 3, 4, 0, 652, 3, 4, 0, 653, 51, 146]] | 5 | 37 | 4 |
l = list(map(int, input().split))
l.sort()
l.reverse()
sl = list(map(str, l))
print(" ".join(sl)) | l = list(map(int, input().split()))
l.sort()
l.reverse()
sl = list(map(str, l))
print(" ".join(sl)) | [["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 47 | 2 |
nums = list(map(int, input().split()))
nums_sort = sorted(nums)
ans = " ".join(map(str,nums_sort))
print(ans) | #! -*- coding:utf-8 -*-
nums = list(map(int, input().split()))
nums_sort = sorted(nums,reverse=True)
ans = " ".join(map(str,nums_sort))
print(ans) | [["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 0, 662, 12, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 662, 12, 652, 3, 4, 0, 653, 51, 146]] | 5 | 42 | 4 |
x = sorted(map(int, input().split(" ")))
for i in range(5):
print(x[i], end=' ') | x = sorted(map(int, input().split(" ")))
for i in range(5):
print(x[4-i], end=' ') | [["+", 0, 652, 3, 4, 0, 206, 206, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 206, 206, 657, 17, 33]] | 5 | 41 | 2 |
print(' '.join(map(str, reversed(sorted(input().split()))))) | print(' '.join(map(str, reversed(sorted(map(int, input().split())))))) | [["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 28 | 5 |
a=sorted([int(i) for i in input().split()],reverse=True)
print(",".join(a)) | a=sorted([int(i) for i in input().split()],reverse=True)
print(" ".join(map(str,a))) | [["-", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6], ["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 36 | 7 |
print(*sorted(list(map(int, input().split()))[::-1])) | print(*sorted(list(map(int, input().split())))[::-1]) | [["+", 3, 4, 0, 206, 51, 652, 3, 4, 0, 25], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 28 | 2 |
print(*sorted(map(int, input().spilt()))[::-1])
| print(*sorted(map(int, input().split()))[::-1])
| [["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22]] | 5 | 25 | 2 |
a = [int(temp) for temp in input().split()]
a.sort
a = [str(temp) for temp in a]
print(' '.join(a)) | a = [int(temp) for temp in input().split()]
a.sort(reverse = True)
a = [str(temp) for temp in a]
print(' '.join(a)) | [["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 51, 146], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 44 | 5 |
# -*- coding:utf-8 -*-
a=list(map(int,input().split(" ")))
a.sort(reverse=True)
for val in a:
print(val) | # -*- coding:utf-8 -*-
a=list(map(int,input().split(" ")))
a.sort(reverse=True)
for val in a:
print(val, end=' ') | [["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655]] | 5 | 38 | 6 |
print(*reversed(list(map(int,input().split()))))
| print(*reversed(sorted(map(int,input().split()))))
| [["-", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22]] | 5 | 22 | 2 |
'''
Created on Mar 22, 2013
@author: wukc
'''
from sys import stdin
a=sorted(map(int,stdin.readline().split()))
print((" ".join(a[::-1]))) | '''
Created on Mar 22, 2013
@author: wukc
'''
from sys import stdin
a=sorted(map(int,stdin.readline().split()))
print((" ".join(map(str,a[::-1])))) | [["+", 0, 23, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 45 | 5 |
print(' '.join(map(str, sorted(map(int, input().split()))))) | print(' '.join(map(str, sorted(map(int, input().split()), reverse=True)))) | [["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 3, 4, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 3, 4, 0, 652, 3, 4, 0, 653, 51, 146]] | 5 | 30 | 4 |
for (s = 1, i = require("fs").readFileSync("/dev/stdin", "utf8"); i--;)
s *= i;
console.log(i) | for (s = i = require("fs").readFileSync("/dev/stdin", "utf8"); --i;)
s *= i;
console.log(s) | [["-", 0, 7, 10, 1, 0, 563, 31, 11, 12, 555], ["-", 0, 493, 0, 7, 10, 1, 0, 563, 0, 21], ["-", 0, 493, 0, 7, 15, 1, 0, 27, 28, 22], ["+", 0, 493, 0, 7, 15, 1, 0, 27, 28, 22], ["-", 0, 493, 0, 1, 0, 2, 3, 3, 0, 22], ["+", 0, 493, 0, 1, 0, 2, 3, 3, 0, 22]] | 2 | 40 | 6 |
var input = parseInt(require("fs").readFileSync("/dev/stdin", "utf8").trim());
var ans = 1;
for (var i = 1; i < input; i++) {
ans *= i;
}
console.log(ans); | var input = parseInt(require("fs").readFileSync("/dev/stdin", "utf8").trim());
var ans = 1;
for (var i = 1; i <= input; i++) {
ans *= i;
}
console.log(ans); | [["-", 0, 493, 0, 7, 15, 1, 0, 16, 17, 18], ["+", 0, 493, 0, 7, 15, 1, 0, 16, 17, 19]] | 2 | 60 | 2 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int answer = 1;
for (int i = 1; i <= num; i++) {
answer = answer * i;
}
System.out.println(answer);
}
} | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
long answer = 1;
for (int i = 1; i <= num; i++) {
answer = answer * i;
}
System.out.println(answer);
}
} | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 80 | 2 |
import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int num, fact = 1;
num = scan.nextInt();
while (num > 1) {
fact *= num;
num--;
}
System.out.println(fact);
}
} | import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
long num, fact = 1;
num = scan.nextInt();
while (num > 1) {
fact *= num;
num--;
}
System.out.println(fact);
}
} | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 73 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans = 1;
for (int i = 2; i <= n; i++) {
ans *= i;
}
System.out.println(ans);
}
} | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long ans = 1;
for (int i = 2; i <= n; i++) {
ans *= i;
}
System.out.println(ans);
}
} | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 78 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] argv) {
int a = 1;
for (int n = (new Scanner(System.in)).nextInt(); n > 0; a *= n--)
;
System.out.println(a);
}
} | import java.util.Scanner;
public class Main {
public static void main(String[] argv) {
long a = 1L;
for (int n = (new Scanner(System.in)).nextInt(); n > 0; a *= n--)
;
System.out.println(a);
}
} | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499]] | 3 | 67 | 4 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
String readStr;
int n = Integer.parseInt(rea... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
String readStr;
long n = Integer.parseInt(re... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 7, 502, 503, 39, 506, 0, 507], ["+", 8, 196, 0, 7, 502, 503, 39, 506, 0, 96]] | 3 | 103 | 4 |
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
int ans = 1;
for (int i = n; i > 0; i--) {
... | import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
long ans = 1;
for (int i = n; i > 0; i--) {... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 106 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
System.out.println(factorial(num));
}
public static int factorial(int n) {
int fact = 1;
if (n == 0)
return fact;
else {
for ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long num = sc.nextInt();
System.out.println(factorial(num));
}
public static long factorial(long n) {
long fact = 1;
if (n == 0)
return fact;
else {
... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96], ["-", 0, 195, 54, 495, 0, 496, 39, 506, 0, 507], ["+", 0, 195, 54, 495, 0, 496, 39, 506, 0, 96], ["-", 75, 196, 0, 7, 502, 503, 3... | 3 | 106 | 10 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
int x = Integer.parseInt(br.readLine());
int fa... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
int x = Integer.parseInt(br.readLine());
long f... | [["-", 0, 246, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 246, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 114 | 2 |
import java.util.*;
class Main {
public static void main(String[] agrs) {
Scanner sc = new Scanner(System.in);
while (sc.hasNextInt()) {
int n = sc.nextInt();
int a[] = new int[n];
int b = 0, c = 1;
for (int i = 0; i < a.length; i++) {
a[i] = n - b;
b++;
}
... | import java.util.*;
class Main {
public static void main(String[] agrs) {
Scanner sc = new Scanner(System.in);
while (sc.hasNextInt()) {
int n = sc.nextInt();
int a[] = new int[n];
int b = 0;
long c = 1;
for (int i = 0; i < a.length; i++) {
a[i] = n - b;
b++;
... | [["-", 8, 196, 0, 52, 8, 196, 0, 503, 0, 21], ["+", 8, 196, 0, 52, 8, 196, 0, 503, 0, 35], ["+", 0, 52, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 137 | 3 |
import java.io.*;
import java.util.*;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int ans = sub(n);
System.out.println(ans);
}
public static int sub(int n) {
if (n > 0) {
return n * sub(n - 1);
} else {
r... | import java.io.*;
import java.util.*;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
long n = scan.nextInt();
long ans = sub(n);
System.out.println(ans);
}
public static long sub(long n) {
if (n > 0) {
return n * sub(n - 1);
} else {
... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96], ["-", 0, 195, 54, 495, 0, 496, 39, 506, 0, 507], ["+", 0, 195, 54, 495, 0, 496, 39, 506, 0, 96]] | 3 | 101 | 8 |
import java.io.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while ((str = br.readLine()) != null) {
int x = Integer.parseInt(str);
System.out.println(fact(x));
}
}
priv... | import java.io.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while ((str = br.readLine()) != null) {
int x = Integer.parseInt(str);
System.out.println(fact(x));
}
}
priv... | [["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96]] | 3 | 112 | 2 |
import java.io.*;
import java.lang.*;
import java.util.*;
public class Main {
public static void main(String[] arg) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String line;
line = input.readLine();
int a = Integer.parseInt(line);
int sum = 1;
... |
import java.io.*;
import java.lang.*;
import java.util.*;
public class Main {
public static void main(String[] arg) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String line;
line = input.readLine();
int a = Integer.parseInt(line);
long sum = 1... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 110 | 2 |
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String nst = br.readLine();
int n = Integer.parseInt(nst);
int fact = 1;
for (int i = 1; i <=... | import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String nst = br.readLine();
int n = Integer.parseInt(nst);
long fact = 1;
for (int i = 1; i ... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 97 | 2 |
import java.util.Scanner;
class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while (sc.hasNext()) {
int n = sc.nextInt();
System.out.println(answar(n));
}
}
static int answar(int n) {
int ans = 1;
for (int i = 1; i <= n; i++) {
ans... | import java.util.Scanner;
class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while (sc.hasNext()) {
int n = sc.nextInt();
System.out.println(answar(n));
}
}
static long answar(int n) {
long ans = 1;
for (int i = 1; i <= n; i++) {
a... | [["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96], ["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 103 | 4 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource") Scanner sc = new Scanner(System.in);
int inputNum = sc.nextInt();
if (inputNum != 0) {
for (int i = inputNum; i > 1; i--) {
inputNum *= (i - 1);
}
System.out.p... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource") Scanner sc = new Scanner(System.in);
long inputNum = sc.nextInt();
if (inputNum != 0) {
for (int i = (int)inputNum; i > 1; i--) {
inputNum *= (i - 1);
}
System... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["+", 0, 7, 502, 503, 49, 200, 51, 74, 0, 24], ["+", 502, 503, 49, 200, 51, 74, 39, 506, 0, 507], ["+", 0, 7, 502, 503, 49, 200, 51, 74, 0, 25]] | 3 | 104 | 5 |
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int i = sc.nextInt();
int a = 1;
for (; i > 0; i--) {
a *= i;
}
System.out.println(a);
}
} | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
long i = sc.nextLong();
long a = 1;
for (; i > 0; i--) {
a *= i;
}
System.out.println(a);
}
} | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]] | 3 | 74 | 6 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main {
static InputReader in;
static PrintWriter out;
static class Solution {
void sol... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main {
static InputReader in;
static PrintWriter out;
static class Solution {
void sol... | [["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96], ["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 409 | 4 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) { print(); }
public static void print() {
try {
int answer = 1;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
St... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) { print(); }
public static void print() {
try {
long answer = 1;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
S... | [["-", 0, 246, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 246, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 140 | 2 |
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
try {
// Input
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
int num, fact;
while ((str = br.readLine()) != null) {... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
try {
// Input
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
int num;
long fact;
while ((str = br.readLine())... | [["-", 8, 196, 0, 246, 8, 196, 0, 503, 0, 21], ["+", 8, 196, 0, 246, 8, 196, 0, 503, 0, 35], ["+", 0, 246, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 137 | 3 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(func(n));
}
public static int func(int n) {
if (n == 1)
return 1;
return n * fu... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(func(n));
}
public static long func(int n) {
if (n == 1)
return 1;
return n * f... | [["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96]] | 3 | 86 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = Integer.parseInt(scan.nextLine());
int factorial = 1;
for (int i = n; i > 0; i--) {
factorial *= i;
}
System.out.println(factorial);
}
} | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = Integer.parseInt(scan.nextLine());
long factorial = 1;
for (int i = n; i > 0; i--) {
factorial *= i;
}
System.out.println(factorial);
}
} | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 83 | 2 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(System.in... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(System.in... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 106 | 2 |
import java.io.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
int answer = 1;
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String s =... |
import java.io.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
long answer = 1;
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String s ... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 111 | 4 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
System.out.println(factorial(n));
}
public static int factorial(int n) {
return n == 0 ? 1 : n * factorial(n - 1);
}
} | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
System.out.println(factorial(n));
}
public static long factorial(int n) {
return n == 0 ? 1 : n * factorial(n - 1);
}
} | [["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96]] | 3 | 81 | 2 |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int number = in.nextInt();
int factorial = number;
for (int i = 1; i < number; i++) {
factorial = factorial * (number - i);
}
System.out.println(factorial);
}
} | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int number = in.nextInt();
long factorial = number;
for (int i = 1; i < number; i++) {
factorial = factorial * (number - i);
}
System.out.println(factorial);
}
} | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 83 | 2 |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int su;
su = sc.nextInt();
int kei = 1;
for (int i = 1; i <= su; i++) {
kei = kei * i;
}
System.out.println(kei);
}
} | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int su;
su = sc.nextInt();
long kei = 1;
for (int i = 1; i <= su; i++) {
kei = kei * i;
}
System.out.println(kei);
}
}
| [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 81 | 2 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Intege... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Intege... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 117 | 2 |
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
System.out.println(fun(n));
}
static int fun(int n) { return (n == 0) ? 1... | import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
System.out.println(fun(n));
}
static long fun(int n) { return (n == 0) ? ... | [["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96]] | 3 | 100 | 2 |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
private Scanner sc;
public static void main(String[] args) { new Main(); }
public Main() {
sc = new Scanner(System.in);
while (sc.hasNextLine() == true) {
int nico = Integer.parseInt(sc.nextLine());
int ans = 1;
... | import java.util.Arrays;
import java.util.Scanner;
public class Main {
private Scanner sc;
public static void main(String[] args) { new Main(); }
public Main() {
sc = new Scanner(System.in);
while (sc.hasNextLine() == true) {
int nico = Integer.parseInt(sc.nextLine());
long ans = 1;
... | [["-", 0, 52, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 52, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 122 | 2 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(br.readLine());
int result = fa... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(br.readLine());
long result = f... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96]] | 3 | 116 | 4 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
System.out.println(fact(n));
}
private static int fact(int n) {
if (n == 0)
return 1;
return n * fact(n - 1);
}
} | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
System.out.println(fact(n));
}
private static long fact(int n) {
if (n == 0)
return 1;
return n * fact(n - 1);
}
} | [["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96]] | 3 | 90 | 2 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
String strLine = "";
BufferedReader stdReader =
new BufferedReader(ne... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
String strLine = "";
BufferedReader stdReader =
new BufferedReader(ne... | [["-", 0, 57, 64, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 57, 64, 196, 0, 503, 39, 506, 0, 96], ["-", 64, 196, 0, 7, 502, 503, 39, 506, 0, 507], ["+", 64, 196, 0, 7, 502, 503, 39, 506, 0, 96]] | 3 | 159 | 6 |
public class Main {
static int n = new java.util.Scanner(System.in).nextInt();
public static void main(String[] args) {
int ans = 1;
for (int i = 1; i <= n; i++) {
ans = ans * i;
}
System.out.println(ans);
}
} | public class Main {
static int n = new java.util.Scanner(System.in).nextInt();
public static void main(String[] args) {
long ans = 1;
for (int i = 1; i <= n; i++) {
ans = ans * i;
}
System.out.println(ans);
}
} | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 73 | 2 |
import java.util.Scanner;
class Main {
public static void main(String[] a) {
Scanner sc = new Scanner(System.in);
int suuji[] = new int[20];
for (int i = 1; i < 21; i++) {
suuji[i - 1] = i;
}
int n = sc.nextInt();
int ans = 1;
for (int i = n; i > 0; i--) {
ans = ans * su... | import java.util.Scanner;
class Main {
public static void main(String[] a) {
Scanner sc = new Scanner(System.in);
int suuji[] = new int[20];
for (int i = 1; i < 21; i++) {
suuji[i - 1] = i;
}
int n = sc.nextInt();
long ans = 1;
for (int i = n; i > 0; i--) {
ans = ans * su... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 120 | 2 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
int n = Integer.parseInt(str... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
long n = Integer.parseInt(str... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96], ["-", 0, 195, 54, 495, 0, 496, 39, 506, 0, 507], ["+", 0, 195, 54, 495, 0, 496, 39, 506, 0, 96], ["-", 8, 196, 0, 7, 502, 503, 39... | 3 | 132 | 8 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = Integer.parseInt(sc.next());
System.out.println(calc(num));
sc.close();
}
static int calc(int num) {
if (num == 1) {
return num;
} else {
re... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = Integer.parseInt(sc.next());
System.out.println(calc(num));
sc.close();
}
static long calc(int num) {
if (num == 1) {
return num;
} else {
r... | [["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96]] | 3 | 100 | 2 |
import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
int rep(int n) {
if (n == 0) {
return 1;
} else {
return rep(n - 1) * n;
}
}
void run() {
int n = sc.nextInt();
System.out.println(rep(n));
}
public static vo... | import java.lang.*;
import java.math.*;
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
long rep(long n) {
if (n == 0) {
return 1;
} else {
return rep(n - 1) * n;
}
}
void run() {
int n = sc.nextInt();
System.out.println(rep(n));
}
public static ... | [["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96], ["-", 0, 195, 54, 495, 0, 496, 39, 506, 0, 507], ["+", 0, 195, 54, 495, 0, 496, 39, 506, 0, 96]] | 3 | 122 | 4 |
import java.util.Scanner;
public class Main {
public static void main(String[] a) {
Scanner s = new Scanner(System.in);
int n = s.nextInt(), i, f = 1;
for (i = 1; i <= n; i++)
f = f * i;
System.out.println(f);
}
} | import java.util.Scanner;
public class Main {
public static void main(String[] a) {
Scanner s = new Scanner(System.in);
int n = s.nextInt(), i;
long f = 1;
for (i = 1; i <= n; i++)
f = f * i;
System.out.println(f);
}
} | [["-", 8, 498, 0, 195, 8, 196, 0, 503, 0, 21], ["+", 8, 498, 0, 195, 8, 196, 0, 503, 0, 35], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 78 | 3 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
int p = 1;
while (n > 1) {
p *= n--;
}
System.out.println(p);
}
} | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
long p = 1;
while (n > 1) {
p *= n--;
}
System.out.println(p);
}
} | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 76 | 2 |
import java.io.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
String s;
int i, n, c = 1;
try {
s = r.readLine();
n = Integer.parseInt(s);
for (i = 1; i <= n; i++)
c *= i;
... | import java.io.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
String s;
int i, n;
long c = 1;
try {
s = r.readLine();
n = Integer.parseInt(s);
for (i = 1; i <= n; i++)
c... | [["-", 8, 498, 0, 195, 8, 196, 0, 503, 0, 21], ["+", 8, 498, 0, 195, 8, 196, 0, 503, 0, 35], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]] | 3 | 112 | 3 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println(kaijo(scan.nextInt()));
}
private static int kaijo(int n) {
if (n == 0) {
return 1;
} else {
return n * kaijo(n - 1);
}
}
} | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println(kaijo(scan.nextLong()));
}
private static long kaijo(long n) {
if (n == 0) {
return 1;
} else {
return n * kaijo(n - 1);
}
}
} | [["-", 3, 4, 0, 492, 3, 4, 0, 492, 141, 22], ["+", 3, 4, 0, 492, 3, 4, 0, 492, 141, 22], ["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96], ["-", 0, 195, 54, 495, 0, 496, 39, 506, 0, 507], ["+", 0, 195, 54, 495, 0, 496, 39, 506, 0, 96]] | 3 | 85 | 6 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext())
System.out.println(f(in.nextInt()));
}
static int f(int v) { return (v == 1) ? 1 : f(v - 1) * v; }
} | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext())
System.out.println(f(in.nextInt()));
}
static long f(long v) { return (v == 1) ? 1 : f(v - 1) * v; }
} | [["-", 0, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96], ["-", 0, 195, 54, 495, 0, 496, 39, 506, 0, 507], ["+", 0, 195, 54, 495, 0, 496, 39, 506, 0, 96]] | 3 | 86 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.