id int64 0 100M | language stringclasses 3
values | prog_lang stringclasses 6
values | category stringclasses 10
values | difficulty stringclasses 3
values | instruction stringlengths 30 86 | output stringlengths 7 192 | text stringlengths 92 300 |
|---|---|---|---|---|---|---|---|
16,641,091 | en | Java | array_ops | advanced | Write a function that reverses a list in Java. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in Java.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
436,087 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 2939. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2939)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 2939.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2939)); |
31,613,592 | ru | C++ | array_ops | intermediate | Напишите на C++ функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
1,645,313 | en | Java | var_decl | beginner | How to declare a variable x with value 528405 in Java? | int x = 528405; | ### Instruction:
How to declare a variable x with value 528405 in Java?
### Response:
int x = 528405; |
510,317 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 7963. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(7963));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 7963.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(7963));
} |
85,600,487 | en | Java | string_ops | intermediate | Write a function that checks if a string is a palindrome in Java. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in Java.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
50,160,267 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 204 простым. | public bool IsPrime() {
int n = 204;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 204 простым.
### Response:
public bool IsPrime() {
int n = 204;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,359,087 | ru | Java | var_decl | beginner | Как объявить переменную count со значением 351517 в Java? | int count = 351517; | ### Instruction:
Как объявить переменную count со значением 351517 в Java?
### Response:
int count = 351517; |
73,423,360 | en | Python | string_ops | advanced | Write a function that counts vowels in a text in Python. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Write a function that counts vowels in a text in Python.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
401,807 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 2001. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(2001)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 2001.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(2001)) |
92,830,271 | kk | Java | logic_ops | advanced | Java тилінде 1910 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1910;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 1910 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1910;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
516,426 | ru | Java | var_decl | beginner | Как объявить переменную index со значением 839225 в Java? | int index = 839225; | ### Instruction:
Как объявить переменную index со значением 839225 в Java?
### Response:
int index = 839225; |
87,894,629 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
73,161,653 | en | JavaScript | array_ops | intermediate | Write a function that finds the maximum number in an array in JavaScript. | const getMax = arr => Math.max(...arr); | ### Instruction:
Write a function that finds the maximum number in an array in JavaScript.
### Response:
const getMax = arr => Math.max(...arr); |
72,482,126 | en | C++ | array_ops | intermediate | Write a function that reverses a list in C++. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in C++.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
285,738 | ru | JavaScript | sum_n | intermediate | Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 6315. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(6315)); | ### Instruction:
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 6315.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(6315)); |
74,237,943 | en | Python | logic_ops | intermediate | Write logic to check if the year 1910 is a leap year in Python. | def is_leap():
year = 1910
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1910 is a leap year in Python.
### Response:
def is_leap():
year = 1910
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,599,268 | kk | Java | var_decl | beginner | Java тілінде 666234 мәнімен value айнымалысын қалай жариялауға болады? | int value = 666234; | ### Instruction:
Java тілінде 666234 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 666234; |
74,522,920 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 82 простым. | public bool IsPrime() {
int n = 82;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 82 простым.
### Response:
public bool IsPrime() {
int n = 82;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,066,051 | kk | Unity | var_decl | beginner | Unity тілінде 878384 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 878384; | ### Instruction:
Unity тілінде 878384 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 878384; |
16,804,682 | kk | C# | string_ops | intermediate | C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
29,123,441 | en | JavaScript | array_ops | intermediate | Write a function that filters only even numbers from a list in JavaScript. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Write a function that filters only even numbers from a list in JavaScript.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
4,645,033 | en | JavaScript | var_decl | beginner | How to declare a variable count with value 419192 in JavaScript? | let count = 419192; | ### Instruction:
How to declare a variable count with value 419192 in JavaScript?
### Response:
let count = 419192; |
22,037,748 | en | C++ | array_ops | intermediate | Write a function that finds the maximum number in an array in C++. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in C++.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
262,791 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 9958. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9958)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 9958.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9958)); |
70,943,741 | en | Unity | string_ops | advanced | Write a function that counts vowels in a text in Unity. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in Unity.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
1,040,845 | kk | C++ | var_decl | beginner | C++ тілінде 960587 мәнімен size айнымалысын қалай жариялауға болады? | int size = 960587; | ### Instruction:
C++ тілінде 960587 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 960587; |
51,233,380 | ru | Unity | string_ops | intermediate | Напишите на Unity функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Unity функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
34,183,935 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 1956 високосным. | public bool IsLeap() {
int y = 1956;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1956 високосным.
### Response:
public bool IsLeap() {
int y = 1956;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,939,797 | ru | JavaScript | var_decl | beginner | Как объявить переменную score со значением 895727 в JavaScript? | let score = 895727; | ### Instruction:
Как объявить переменную score со значением 895727 в JavaScript?
### Response:
let score = 895727; |
78,189,985 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 1950 високосным. | def is_leap():
year = 1950
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1950 високосным.
### Response:
def is_leap():
year = 1950
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
91,304,523 | ru | Unity | string_ops | advanced | Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
35,447,117 | kk | Unity | array_ops | advanced | Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
67,942,394 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Java функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
83,223,593 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 2009 високосным. | public bool IsLeap() {
int y = 2009;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2009 високосным.
### Response:
public bool IsLeap() {
int y = 2009;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,334,510 | kk | Python | var_decl | beginner | Python тілінде 691485 мәнімен total айнымалысын қалай жариялауға болады? | total = 691485 | ### Instruction:
Python тілінде 691485 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
total = 691485 |
67,586,471 | kk | Unity | logic_ops | advanced | Unity тилінде 1964 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1964;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1964 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1964;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,561,918 | en | JavaScript | var_decl | beginner | How to declare a variable count with value 524355 in JavaScript? | let count = 524355; | ### Instruction:
How to declare a variable count with value 524355 in JavaScript?
### Response:
let count = 524355; |
76,756,328 | en | Unity | array_ops | advanced | Write a function that filters only even numbers from a list in Unity. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Unity.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
23,310,216 | kk | Java | array_ops | advanced | Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
82,565,605 | kk | JavaScript | string_ops | advanced | JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
347,816 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 7703. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(7703)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 7703.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(7703)) |
57,211,097 | kk | Unity | array_ops | intermediate | Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
5,125 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 31-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(31)); | ### Instruction:
C# тілінде 1-ден 31-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(31)); |
15,540,453 | en | Unity | logic_ops | advanced | Write a function that determines if the number 392 is prime in Unity. | public bool IsPrime() {
int n = 392;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 392 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 392;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
90,827,683 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
98,796,571 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 14 простым. | public bool IsPrime() {
int n = 14;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 14 простым.
### Response:
public bool IsPrime() {
int n = 14;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
47,709,866 | kk | Python | string_ops | intermediate | Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
1,186,547 | en | Java | var_decl | beginner | How to declare a variable speed with value 800908 in Java? | int speed = 800908; | ### Instruction:
How to declare a variable speed with value 800908 in Java?
### Response:
int speed = 800908; |
334,166 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 2856-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int sum_to_n(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
std::cout << sum_to_n(2856) << std::endl; | ### Instruction:
C++ тілінде 1-ден 2856-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int sum_to_n(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
std::cout << sum_to_n(2856) << std::endl; |
46,003,737 | kk | Python | logic_ops | intermediate | Python тилінде 198 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 198
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 198 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 198
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
626,962 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 5473. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(5473)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 5473.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(5473)); |
1,689,562 | kk | C# | var_decl | beginner | C# тілінде 124258 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 124258; | ### Instruction:
C# тілінде 124258 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 124258; |
2,765,719 | en | Python | var_decl | beginner | How to declare a variable speed with value 153129 in Python? | speed = 153129 | ### Instruction:
How to declare a variable speed with value 153129 in Python?
### Response:
speed = 153129 |
24,419,273 | en | JavaScript | string_ops | advanced | Write a function that converts a string to uppercase in JavaScript. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Write a function that converts a string to uppercase in JavaScript.
### Response:
const toUpper = s => s.toUpperCase(); |
172,503 | kk | Java | var_decl | beginner | Java тілінде 784859 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 784859; | ### Instruction:
Java тілінде 784859 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 784859; |
4,128,072 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 649675 мәнімен count айнымалысын қалай жариялауға болады? | let count = 649675; | ### Instruction:
JavaScript тілінде 649675 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
let count = 649675; |
2,196,157 | ru | Unity | var_decl | beginner | Как объявить переменную health со значением 53910 в Unity? | int health = 53910; | ### Instruction:
Как объявить переменную health со значением 53910 в Unity?
### Response:
int health = 53910; |
86,201,249 | en | C# | string_ops | intermediate | Write a function that converts a string to uppercase in C#. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in C#.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
3,877,357 | ru | C# | var_decl | beginner | Как объявить переменную x со значением 61898 в C#? | int x = 61898; | ### Instruction:
Как объявить переменную x со значением 61898 в C#?
### Response:
int x = 61898; |
3,854,543 | kk | Python | var_decl | beginner | Python тілінде 162364 мәнімен size айнымалысын қалай жариялауға болады? | size = 162364 | ### Instruction:
Python тілінде 162364 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
size = 162364 |
53,907,401 | en | C++ | array_ops | advanced | Write a function that filters only even numbers from a list in C++. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in C++.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
276,800 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 8927. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(8927)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 8927.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(8927)); |
45,434 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 4694-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(4694)); | ### Instruction:
JavaScript тілінде 1-ден 4694-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(4694)); |
3,988,385 | en | Java | var_decl | beginner | How to declare a variable speed with value 337331 in Java? | int speed = 337331; | ### Instruction:
How to declare a variable speed with value 337331 in Java?
### Response:
int speed = 337331; |
94,020,186 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
76,914,856 | en | C++ | logic_ops | advanced | Write a function that determines if the number 125 is prime in C++. | public bool IsPrime() {
int n = 125;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 125 is prime in C++.
### Response:
public bool IsPrime() {
int n = 125;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
83,311,306 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 248 простым. | public bool IsPrime() {
int n = 248;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 248 простым.
### Response:
public bool IsPrime() {
int n = 248;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
40,907,183 | kk | C# | logic_ops | intermediate | C# тилінде 2086 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2086;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2086 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2086;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
64,935,828 | en | JavaScript | array_ops | intermediate | Write a function that finds the maximum number in an array in JavaScript. | const getMax = arr => Math.max(...arr); | ### Instruction:
Write a function that finds the maximum number in an array in JavaScript.
### Response:
const getMax = arr => Math.max(...arr); |
78,700,173 | en | Unity | logic_ops | intermediate | Write logic to check if the year 2046 is a leap year in Unity. | public bool IsLeap() {
int y = 2046;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2046 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 2046;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
35,113,899 | kk | Java | logic_ops | advanced | Java тилінде 204 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 204;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 204 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 204;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,934,603 | kk | Python | var_decl | beginner | Python тілінде 185305 мәнімен weight айнымалысын қалай жариялауға болады? | weight = 185305 | ### Instruction:
Python тілінде 185305 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
weight = 185305 |
32,442,616 | kk | C++ | logic_ops | intermediate | C++ тилінде 1936 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1936;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1936 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1936;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
83,231 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 4199. | int sum_to_n(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
std::cout << sum_to_n(4199) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 4199.
### Response:
int sum_to_n(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
std::cout << sum_to_n(4199) << std::endl; |
58,376,555 | en | Python | logic_ops | advanced | Write a function that determines if the number 115 is prime in Python. | def is_prime():
n = 115
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Write a function that determines if the number 115 is prime in Python.
### Response:
def is_prime():
n = 115
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
96,667,203 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 105 простым. | public bool IsPrime() {
int n = 105;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 105 простым.
### Response:
public bool IsPrime() {
int n = 105;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
49,087,212 | en | Java | logic_ops | intermediate | Write logic to check if the year 1979 is a leap year in Java. | public bool IsLeap() {
int y = 1979;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1979 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1979;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,596,451 | kk | C++ | var_decl | beginner | C++ тілінде 696947 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 696947; | ### Instruction:
C++ тілінде 696947 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 696947; |
44,608,898 | ru | Unity | logic_ops | advanced | Напишите на Unity логику проверки, является ли год 2074 високосным. | public bool IsLeap() {
int y = 2074;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 2074 високосным.
### Response:
public bool IsLeap() {
int y = 2074;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
41,375,712 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 36 is prime in Unity. | public bool IsPrime() {
int n = 36;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 36 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 36;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,951,784 | kk | Python | var_decl | beginner | Python тілінде 767469 мәнімен count айнымалысын қалай жариялауға болады? | count = 767469 | ### Instruction:
Python тілінде 767469 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
count = 767469 |
520,444 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 9977. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(9977)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 9977.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(9977)); |
3,123,933 | ru | Unity | var_decl | beginner | Как объявить переменную value со значением 468090 в Unity? | int value = 468090; | ### Instruction:
Как объявить переменную value со значением 468090 в Unity?
### Response:
int value = 468090; |
186,050 | kk | Java | factorial | advanced | Java тілінде 5015 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(5015)); | ### Instruction:
Java тілінде 5015 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(5015)); |
98,688,942 | en | Unity | logic_ops | intermediate | Write logic to check if the year 2016 is a leap year in Unity. | public bool IsLeap() {
int y = 2016;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2016 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 2016;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
39,210,531 | ru | C# | array_ops | intermediate | Напишите на C# функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на C# функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
46,906,261 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
28,566,612 | ru | C# | string_ops | advanced | Напишите на C# функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C# функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
4,445,998 | ru | Python | var_decl | beginner | Как объявить переменную result со значением 201782 в Python? | result = 201782 | ### Instruction:
Как объявить переменную result со значением 201782 в Python?
### Response:
result = 201782 |
1,384,755 | en | JavaScript | var_decl | beginner | How to declare a variable speed with value 213149 in JavaScript? | let speed = 213149; | ### Instruction:
How to declare a variable speed with value 213149 in JavaScript?
### Response:
let speed = 213149; |
667,359 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 3340. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3340)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 3340.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3340)) |
55,043,700 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
34,155,062 | kk | C# | array_ops | advanced | C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
4,312,198 | kk | C# | var_decl | beginner | C# тілінде 68190 мәнімен health айнымалысын қалай жариялауға болады? | int health = 68190; | ### Instruction:
C# тілінде 68190 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 68190; |
4,496,163 | en | Python | var_decl | beginner | How to declare a variable count with value 960830 in Python? | count = 960830 | ### Instruction:
How to declare a variable count with value 960830 in Python?
### Response:
count = 960830 |
57,166,950 | en | C++ | string_ops | advanced | Write a function that counts vowels in a text in C++. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C++.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
39,620,581 | kk | Java | logic_ops | intermediate | Java тилінде 2072 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2072;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2072 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2072;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
62,955,146 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
96,597,091 | en | C# | logic_ops | advanced | Write a function that determines if the number 44 is prime in C#. | public bool IsPrime() {
int n = 44;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 44 is prime in C#.
### Response:
public bool IsPrime() {
int n = 44;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.