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 |
|---|---|---|---|---|---|---|---|
39,540,220 | kk | Python | logic_ops | intermediate | Python тилінде 444 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 444
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 444 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 444
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
13,005,241 | 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;
} |
73,788,070 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 110 is prime in C++. | public bool IsPrime() {
int n = 110;
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 110 is prime in C++.
### Response:
public bool IsPrime() {
int n = 110;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
49,835,681 | ru | Unity | string_ops | advanced | Напишите на Unity функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Unity функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
88,808 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 6581. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6581)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 6581.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6581)); |
614,649 | ru | Unity | var_decl | beginner | Как объявить переменную value со значением 244788 в Unity? | int value = 244788; | ### Instruction:
Как объявить переменную value со значением 244788 в Unity?
### Response:
int value = 244788; |
66,080,252 | kk | C++ | string_ops | advanced | C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
25,864,699 | kk | Unity | logic_ops | intermediate | Unity тилінде 356 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 356;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 356 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 356;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,351,126 | en | C# | var_decl | beginner | How to declare a variable health with value 243701 in C#? | int health = 243701; | ### Instruction:
How to declare a variable health with value 243701 in C#?
### Response:
int health = 243701; |
3,763,374 | kk | Unity | var_decl | beginner | Unity тілінде 414733 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 414733; | ### Instruction:
Unity тілінде 414733 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 414733; |
219,137 | kk | Java | sum_n | intermediate | Java тілінде 1-ден 2379-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(2379)); | ### Instruction:
Java тілінде 1-ден 2379-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(2379)); |
3,071,887 | en | Java | var_decl | beginner | How to declare a variable buffer with value 256788 in Java? | int buffer = 256788; | ### Instruction:
How to declare a variable buffer with value 256788 in Java?
### Response:
int buffer = 256788; |
77,889,962 | kk | C# | string_ops | intermediate | C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | 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:
C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### 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;
} |
70,479,239 | kk | Unity | logic_ops | advanced | Unity тилінде 1939 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1939;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1939 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1939;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
17,759,905 | en | Python | array_ops | intermediate | Write a function that finds the maximum number in an array in Python. | def get_max(arr):
return max(arr) | ### Instruction:
Write a function that finds the maximum number in an array in Python.
### Response:
def get_max(arr):
return max(arr) |
2,354,524 | ru | C# | var_decl | beginner | Как объявить переменную offset со значением 445833 в C#? | int offset = 445833; | ### Instruction:
Как объявить переменную offset со значением 445833 в C#?
### Response:
int offset = 445833; |
2,227,360 | kk | Unity | var_decl | beginner | Unity тілінде 519126 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 519126; | ### Instruction:
Unity тілінде 519126 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 519126; |
63,246,274 | kk | C# | logic_ops | advanced | C# тилінде 268 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 268;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 268 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 268;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
289,807 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 6777. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6777));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 6777.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6777));
} |
789,662 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 9391. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9391) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 9391.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9391) << std::endl; |
81,243,337 | ru | C# | string_ops | intermediate | Напишите на C# функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C# функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
29,655,794 | 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;
} |
3,685,945 | kk | Java | var_decl | beginner | Java тілінде 164630 мәнімен index айнымалысын қалай жариялауға болады? | int index = 164630; | ### Instruction:
Java тілінде 164630 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 164630; |
86,204,174 | en | C++ | string_ops | intermediate | Write a function that checks if a string is a palindrome in C++. | 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 C++.
### 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;
} |
2,530,463 | en | C# | var_decl | beginner | How to declare a variable y with value 225694 in C#? | int y = 225694; | ### Instruction:
How to declare a variable y with value 225694 in C#?
### Response:
int y = 225694; |
680,001 | en | C++ | var_decl | beginner | How to declare a variable health with value 52007 in C++? | int health = 52007; | ### Instruction:
How to declare a variable health with value 52007 in C++?
### Response:
int health = 52007; |
51,538,170 | 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);
} |
24,283,470 | ru | Unity | logic_ops | advanced | Напишите на Unity логику проверки, является ли год 1968 високосным. | public bool IsLeap() {
int y = 1968;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 1968 високосным.
### Response:
public bool IsLeap() {
int y = 1968;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
17,721,293 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 1961 високосным. | public bool IsLeap() {
int y = 1961;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 1961 високосным.
### Response:
public bool IsLeap() {
int y = 1961;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,856,930 | en | Python | var_decl | beginner | How to declare a variable speed with value 741105 in Python? | speed = 741105 | ### Instruction:
How to declare a variable speed with value 741105 in Python?
### Response:
speed = 741105 |
1,499,693 | ru | Unity | var_decl | beginner | Как объявить переменную amount со значением 154641 в Unity? | int amount = 154641; | ### Instruction:
Как объявить переменную amount со значением 154641 в Unity?
### Response:
int amount = 154641; |
1,902,516 | ru | Unity | var_decl | beginner | Как объявить переменную count со значением 510533 в Unity? | int count = 510533; | ### Instruction:
Как объявить переменную count со значением 510533 в Unity?
### Response:
int count = 510533; |
825,609 | ru | JavaScript | var_decl | beginner | Как объявить переменную data со значением 651080 в JavaScript? | let data = 651080; | ### Instruction:
Как объявить переменную data со значением 651080 в JavaScript?
### Response:
let data = 651080; |
69,741,313 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 1931 is a leap year in JavaScript. | function isLeap() {
let y = 1931;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1931 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1931;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
43,113,048 | en | Python | string_ops | intermediate | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
78,391,623 | kk | Java | array_ops | advanced | Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
60,063,935 | kk | Unity | logic_ops | intermediate | Unity тилінде 41 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 41;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 41 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 41;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
623,243 | kk | JavaScript | factorial | advanced | JavaScript тілінде 6359 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6359)); | ### Instruction:
JavaScript тілінде 6359 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6359)); |
1,165,787 | ru | C# | var_decl | beginner | Как объявить переменную offset со значением 308284 в C#? | int offset = 308284; | ### Instruction:
Как объявить переменную offset со значением 308284 в C#?
### Response:
int offset = 308284; |
69,861,974 | en | C++ | logic_ops | advanced | Write a function that determines if the number 356 is prime in C++. | public bool IsPrime() {
int n = 356;
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 356 is prime in C++.
### Response:
public bool IsPrime() {
int n = 356;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
83,915,787 | en | Java | logic_ops | intermediate | Write a function that determines if the number 324 is prime in Java. | public bool IsPrime() {
int n = 324;
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 324 is prime in Java.
### Response:
public bool IsPrime() {
int n = 324;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
64,735,180 | en | Unity | string_ops | advanced | Write a function that checks if a string is a palindrome in 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:
Write a function that checks if a string is a palindrome in 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;
} |
37,538,942 | kk | C++ | string_ops | advanced | 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;
} |
4,690,347 | ru | C# | var_decl | beginner | Как объявить переменную rate со значением 991910 в C#? | int rate = 991910; | ### Instruction:
Как объявить переменную rate со значением 991910 в C#?
### Response:
int rate = 991910; |
2,446,677 | ru | Python | var_decl | beginner | Как объявить переменную buffer со значением 141921 в Python? | buffer = 141921 | ### Instruction:
Как объявить переменную buffer со значением 141921 в Python?
### Response:
buffer = 141921 |
4,055,192 | ru | C++ | var_decl | beginner | Как объявить переменную rate со значением 638386 в C++? | int rate = 638386; | ### Instruction:
Как объявить переменную rate со значением 638386 в C++?
### Response:
int rate = 638386; |
3,213,959 | en | Python | var_decl | beginner | How to declare a variable amount with value 968512 in Python? | amount = 968512 | ### Instruction:
How to declare a variable amount with value 968512 in Python?
### Response:
amount = 968512 |
49,962,650 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 2019 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2019;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2019 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2019;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,804,603 | en | JavaScript | var_decl | beginner | How to declare a variable amount with value 243345 in JavaScript? | let amount = 243345; | ### Instruction:
How to declare a variable amount with value 243345 in JavaScript?
### Response:
let amount = 243345; |
3,746,892 | kk | Unity | var_decl | beginner | Unity тілінде 302524 мәнімен score айнымалысын қалай жариялауға болады? | int score = 302524; | ### Instruction:
Unity тілінде 302524 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 302524; |
172,348 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 8657. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(8657)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 8657.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(8657)); |
3,577,977 | kk | C# | var_decl | beginner | C# тілінде 522155 мәнімен score айнымалысын қалай жариялауға болады? | int score = 522155; | ### Instruction:
C# тілінде 522155 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 522155; |
2,425,111 | en | Unity | var_decl | beginner | How to declare a variable health with value 424225 in Unity? | int health = 424225; | ### Instruction:
How to declare a variable health with value 424225 in Unity?
### Response:
int health = 424225; |
4,802,871 | en | JavaScript | var_decl | beginner | How to declare a variable speed with value 132285 in JavaScript? | let speed = 132285; | ### Instruction:
How to declare a variable speed with value 132285 in JavaScript?
### Response:
let speed = 132285; |
82,298,725 | kk | C# | string_ops | intermediate | C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
30,057,553 | kk | Unity | array_ops | intermediate | 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:
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;
} |
68,421,218 | kk | Java | string_ops | advanced | 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:
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;
} |
134,266 | kk | Java | factorial | advanced | Java тілінде 9539 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(9539)); | ### Instruction:
Java тілінде 9539 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(9539)); |
4,405,429 | kk | Unity | var_decl | beginner | Unity тілінде 299628 мәнімен y айнымалысын қалай жариялауға болады? | int y = 299628; | ### Instruction:
Unity тілінде 299628 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 299628; |
3,529,316 | kk | C# | var_decl | beginner | C# тілінде 265634 мәнімен data айнымалысын қалай жариялауға болады? | int data = 265634; | ### Instruction:
C# тілінде 265634 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 265634; |
66,049,744 | en | C# | logic_ops | intermediate | Write logic to check if the year 1915 is a leap year in C#. | public bool IsLeap() {
int y = 1915;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1915 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1915;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,226 | ru | Unity | class_def | intermediate | Напиши пустой класс Spawner в Unity. | public class Spawner : MonoBehaviour {
void Start() {}
} | ### Instruction:
Напиши пустой класс Spawner в Unity.
### Response:
public class Spawner : MonoBehaviour {
void Start() {}
} |
43,117,978 | en | Java | string_ops | advanced | 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;
} |
67,037,361 | 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);
} |
96,734,866 | en | C++ | logic_ops | intermediate | Write logic to check if the year 1992 is a leap year in C++. | public bool IsLeap() {
int y = 1992;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1992 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 1992;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
36,127,307 | kk | C++ | array_ops | advanced | 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,787,945 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 516576 мәнімен rate айнымалысын қалай жариялауға болады? | let rate = 516576; | ### Instruction:
JavaScript тілінде 516576 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
let rate = 516576; |
448,637 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 4987. | 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(4987) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 4987.
### 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(4987) << std::endl; |
77,199,048 | ru | C++ | string_ops | advanced | Напишите на 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;
} |
80,688,318 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 2031 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2031;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2031 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2031;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
58,436,256 | kk | Unity | logic_ops | advanced | Unity тилінде 2035 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2035;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2035 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2035;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,974,926 | ru | C++ | var_decl | beginner | Как объявить переменную timer со значением 935526 в C++? | int timer = 935526; | ### Instruction:
Как объявить переменную timer со значением 935526 в C++?
### Response:
int timer = 935526; |
22,506,634 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 1916 високосным. | def is_leap():
year = 1916
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1916 високосным.
### Response:
def is_leap():
year = 1916
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
84,787,842 | en | JavaScript | array_ops | advanced | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
351,414 | en | JavaScript | var_decl | beginner | How to declare a variable size with value 177724 in JavaScript? | let size = 177724; | ### Instruction:
How to declare a variable size with value 177724 in JavaScript?
### Response:
let size = 177724; |
1,279,473 | kk | Java | var_decl | beginner | Java тілінде 206336 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 206336; | ### Instruction:
Java тілінде 206336 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 206336; |
14,093,073 | en | Java | logic_ops | advanced | Write a function that determines if the number 462 is prime in Java. | public bool IsPrime() {
int n = 462;
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 462 is prime in Java.
### Response:
public bool IsPrime() {
int n = 462;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
43,554,151 | en | Python | array_ops | advanced | Write a function that finds the maximum number in an array in Python. | def get_max(arr):
return max(arr) | ### Instruction:
Write a function that finds the maximum number in an array in Python.
### Response:
def get_max(arr):
return max(arr) |
38,593,904 | kk | Python | string_ops | intermediate | Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
def is_palindrome(s):
return s == s[::-1] |
4,457,636 | en | JavaScript | var_decl | beginner | How to declare a variable limit with value 638101 in JavaScript? | let limit = 638101; | ### Instruction:
How to declare a variable limit with value 638101 in JavaScript?
### Response:
let limit = 638101; |
16,580,048 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая фильтрует только четные числа из списка. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Напишите на Python функцию, которая фильтрует только четные числа из списка.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
67,906,643 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
82,512,984 | kk | Python | string_ops | advanced | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
10,524,811 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 435 простым. | public bool IsPrime() {
int n = 435;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 435 простым.
### Response:
public bool IsPrime() {
int n = 435;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
54,810,934 | en | Unity | array_ops | advanced | Write a function that finds the maximum number in an array in Unity. | 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 Unity.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
2,894,454 | ru | JavaScript | var_decl | beginner | Как объявить переменную count со значением 468924 в JavaScript? | let count = 468924; | ### Instruction:
Как объявить переменную count со значением 468924 в JavaScript?
### Response:
let count = 468924; |
346,228 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 3037. | 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(3037) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 3037.
### 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(3037) << std::endl; |
65,176,525 | ru | C# | array_ops | advanced | Напишите на C# функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на C# функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
96,029,331 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
71,014,555 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
994,520 | kk | Unity | var_decl | beginner | Unity тілінде 590527 мәнімен data айнымалысын қалай жариялауға болады? | int data = 590527; | ### Instruction:
Unity тілінде 590527 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 590527; |
46,613,136 | en | JavaScript | array_ops | advanced | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
849,223 | ru | C++ | var_decl | beginner | Как объявить переменную index со значением 228825 в C++? | int index = 228825; | ### Instruction:
Как объявить переменную index со значением 228825 в C++?
### Response:
int index = 228825; |
22,073,093 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 215 простым. | public bool IsPrime() {
int n = 215;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 215 простым.
### Response:
public bool IsPrime() {
int n = 215;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,993,333 | en | Java | var_decl | beginner | How to declare a variable timer with value 132902 in Java? | int timer = 132902; | ### Instruction:
How to declare a variable timer with value 132902 in Java?
### Response:
int timer = 132902; |
76,558,497 | kk | 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;
} |
16,951,974 | ru | Java | string_ops | advanced | Напишите на 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:
Напишите на 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;
} |
87,974,111 | kk | C# | array_ops | intermediate | C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
81,678,951 | kk | C# | logic_ops | intermediate | C# тилінде 2058 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2058;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2058 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2058;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
21,183,781 | en | C# | array_ops | advanced | 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;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.