id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
1,565,494 | ru | C++ | var_decl | beginner | Как объявить переменную score со значением 14790 в C++? | int score = 14790; | ### Instruction:
Как объявить переменную score со значением 14790 в C++?
### Response:
int score = 14790; |
4,755,908 | kk | Java | var_decl | beginner | Java тілінде 696384 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 696384; | ### Instruction:
Java тілінде 696384 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 696384; |
34,161,195 | en | C# | logic_ops | intermediate | Write a function that determines if the number 424 is prime in C#. | public bool IsPrime() {
int n = 424;
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 424 is prime in C#.
### Response:
public bool IsPrime() {
int n = 424;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,554,539 | en | Python | var_decl | beginner | How to declare a variable amount with value 971443 in Python? | amount = 971443 | ### Instruction:
How to declare a variable amount with value 971443 in Python?
### Response:
amount = 971443 |
2,594,151 | ru | C++ | var_decl | beginner | Как объявить переменную value со значением 795329 в C++? | int value = 795329; | ### Instruction:
Как объявить переменную value со значением 795329 в C++?
### Response:
int value = 795329; |
78,985,847 | 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; |
2,635,676 | kk | C# | var_decl | beginner | C# тілінде 716368 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 716368; | ### Instruction:
C# тілінде 716368 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 716368; |
48,522,744 | kk | Java | logic_ops | advanced | Java тилінде 2067 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2067;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2067 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2067;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,422,065 | kk | Java | var_decl | beginner | Java тілінде 903769 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 903769; | ### Instruction:
Java тілінде 903769 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 903769; |
39,217,085 | en | Java | logic_ops | intermediate | Write a function that determines if the number 233 is prime in Java. | public bool IsPrime() {
int n = 233;
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 233 is prime in Java.
### Response:
public bool IsPrime() {
int n = 233;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
83,236,502 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
64,670,199 | 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); |
43,661,679 | en | C# | array_ops | intermediate | 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;
} |
17,991,696 | 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;
} |
55,620,379 | en | JavaScript | string_ops | intermediate | Write a function that counts vowels in a text in JavaScript. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Write a function that counts vowels in a text in JavaScript.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
1,627,301 | kk | C# | var_decl | beginner | C# тілінде 504064 мәнімен index айнымалысын қалай жариялауға болады? | int index = 504064; | ### Instruction:
C# тілінде 504064 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 504064; |
1,965,818 | ru | Java | var_decl | beginner | Как объявить переменную timer со значением 421605 в Java? | int timer = 421605; | ### Instruction:
Как объявить переменную timer со значением 421605 в Java?
### Response:
int timer = 421605; |
43,156,265 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 60 is prime in JavaScript. | function isPrime() {
let n = 60;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 60 is prime in JavaScript.
### Response:
function isPrime() {
let n = 60;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
438,642 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 84. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(84)); | ### Instruction:
Write a function in C# that calculates the factorial of 84.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(84)); |
10,319,964 | kk | Unity | string_ops | advanced | Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
18,917,233 | en | Java | logic_ops | intermediate | Write a function that determines if the number 303 is prime in Java. | public bool IsPrime() {
int n = 303;
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 303 is prime in Java.
### Response:
public bool IsPrime() {
int n = 303;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
50,801,941 | 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;
} |
45,558,307 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 431 простым. | public bool IsPrime() {
int n = 431;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 431 простым.
### Response:
public bool IsPrime() {
int n = 431;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,973,349 | en | Java | var_decl | beginner | How to declare a variable timer with value 141013 in Java? | int timer = 141013; | ### Instruction:
How to declare a variable timer with value 141013 in Java?
### Response:
int timer = 141013; |
33,836 | en | Unity | func_def | intermediate | Write a function resolve in Unity that takes amount and doubles it. | int resolve(int amount) {
return amount * 2;
} | ### Instruction:
Write a function resolve in Unity that takes amount and doubles it.
### Response:
int resolve(int amount) {
return amount * 2;
} |
3,784,583 | kk | Unity | var_decl | beginner | Unity тілінде 380623 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 380623; | ### Instruction:
Unity тілінде 380623 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 380623; |
1,764,228 | kk | Unity | var_decl | beginner | Unity тілінде 604518 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 604518; | ### Instruction:
Unity тілінде 604518 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 604518; |
1,000,891 | en | C++ | var_decl | beginner | How to declare a variable result with value 441460 in C++? | int result = 441460; | ### Instruction:
How to declare a variable result with value 441460 in C++?
### Response:
int result = 441460; |
18,931,498 | kk | C++ | logic_ops | advanced | C++ тилінде 1999 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1999;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1999 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1999;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,378,674 | kk | Unity | var_decl | beginner | Unity тілінде 98687 мәнімен size айнымалысын қалай жариялауға болады? | int size = 98687; | ### Instruction:
Unity тілінде 98687 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 98687; |
96,932,370 | ru | 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;
} |
324,184 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 9900. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9900) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 9900.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9900) << std::endl; |
86,901,545 | en | C# | logic_ops | advanced | Write logic to check if the year 1912 is a leap year in C#. | public bool IsLeap() {
int y = 1912;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1912 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1912;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,814,369 | ru | Java | var_decl | beginner | Как объявить переменную weight со значением 751158 в Java? | int weight = 751158; | ### Instruction:
Как объявить переменную weight со значением 751158 в Java?
### Response:
int weight = 751158; |
61,882,338 | 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;
} |
18,615,722 | 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;
} |
73,837,632 | 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) |
1,053,530 | kk | Python | var_decl | beginner | Python тілінде 409819 мәнімен weight айнымалысын қалай жариялауға болады? | weight = 409819 | ### Instruction:
Python тілінде 409819 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
weight = 409819 |
99,093,536 | kk | C++ | logic_ops | intermediate | C++ тилінде 123 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 123;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 123 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 123;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
72,702,199 | ru | Unity | string_ops | intermediate | Напишите на Unity функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
40,700,681 | 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();
} |
682,923 | ru | Python | var_decl | beginner | Как объявить переменную count со значением 244487 в Python? | count = 244487 | ### Instruction:
Как объявить переменную count со значением 244487 в Python?
### Response:
count = 244487 |
23,834,731 | kk | Python | string_ops | intermediate | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
40,572,547 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1906 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1906;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1906 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1906;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
74,051,055 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Unity функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
31,523,698 | kk | C++ | logic_ops | intermediate | C++ тилінде 2064 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2064;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 2064 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2064;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
80,897,910 | ru | 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;
} |
24,117,200 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 1939 високосным. | public bool IsLeap() {
int y = 1939;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1939 високосным.
### Response:
public bool IsLeap() {
int y = 1939;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
52,527,334 | ru | C++ | string_ops | advanced | Напишите на 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;
} |
64,704,287 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Unity функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
3,006,342 | ru | Python | var_decl | beginner | Как объявить переменную amount со значением 957745 в Python? | amount = 957745 | ### Instruction:
Как объявить переменную amount со значением 957745 в Python?
### Response:
amount = 957745 |
58,811,318 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
4,966,527 | kk | C++ | var_decl | beginner | C++ тілінде 248054 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 248054; | ### Instruction:
C++ тілінде 248054 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 248054; |
20,634,134 | 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);
} |
3,093,119 | kk | Python | var_decl | beginner | Python тілінде 476598 мәнімен index айнымалысын қалай жариялауға болады? | index = 476598 | ### Instruction:
Python тілінде 476598 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
index = 476598 |
38,276,280 | en | C# | logic_ops | intermediate | Write logic to check if the year 1909 is a leap year in C#. | public bool IsLeap() {
int y = 1909;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1909 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1909;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
96,100,701 | kk | C++ | logic_ops | advanced | C++ тилінде 400 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 400;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 400 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 400;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
13,598,770 | kk | Python | array_ops | intermediate | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
2,565,256 | ru | Python | var_decl | beginner | Как объявить переменную size со значением 227490 в Python? | size = 227490 | ### Instruction:
Как объявить переменную size со значением 227490 в Python?
### Response:
size = 227490 |
522,592 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 7307. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(7307)); | ### Instruction:
Write a function in C# that calculates the factorial of 7307.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(7307)); |
3,138,008 | en | JavaScript | var_decl | beginner | How to declare a variable x with value 67257 in JavaScript? | let x = 67257; | ### Instruction:
How to declare a variable x with value 67257 in JavaScript?
### Response:
let x = 67257; |
208,307 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 2281. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2281)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 2281.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2281)); |
41,218,681 | 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;
} |
257,742 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 1752. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(1752)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 1752.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(1752)) |
28,902,986 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 227 простым. | public bool IsPrime() {
int n = 227;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 227 простым.
### Response:
public bool IsPrime() {
int n = 227;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
29,354,753 | en | Java | array_ops | intermediate | Write a function that filters only even numbers from a list in 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:
Write a function that filters only even numbers from a list in 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;
} |
43,343,731 | kk | JavaScript | array_ops | advanced | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
69,090,267 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 299 простым. | public bool IsPrime() {
int n = 299;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 299 простым.
### Response:
public bool IsPrime() {
int n = 299;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,297,232 | en | Unity | var_decl | beginner | How to declare a variable health with value 165562 in Unity? | int health = 165562; | ### Instruction:
How to declare a variable health with value 165562 in Unity?
### Response:
int health = 165562; |
32,886,772 | kk | Python | logic_ops | advanced | Python тилінде 471 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 471
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 471 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 471
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
531,057 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 6758-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(6758)); | ### Instruction:
JavaScript тілінде 1-ден 6758-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(6758)); |
2,304,216 | en | Java | var_decl | beginner | How to declare a variable score with value 481468 in Java? | int score = 481468; | ### Instruction:
How to declare a variable score with value 481468 in Java?
### Response:
int score = 481468; |
2,235,631 | en | C++ | var_decl | beginner | How to declare a variable result with value 184503 in C++? | int result = 184503; | ### Instruction:
How to declare a variable result with value 184503 in C++?
### Response:
int result = 184503; |
1,082,023 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 8890. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(8890) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 8890.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(8890) << std::endl; |
83,830,883 | en | Python | array_ops | intermediate | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
79,402,862 | ru | C# | array_ops | intermediate | Напишите на 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;
} |
4,557,926 | ru | Java | var_decl | beginner | Как объявить переменную level со значением 638465 в Java? | int level = 638465; | ### Instruction:
Как объявить переменную level со значением 638465 в Java?
### Response:
int level = 638465; |
2,418,515 | kk | C++ | var_decl | beginner | C++ тілінде 288468 мәнімен count айнымалысын қалай жариялауға болады? | int count = 288468; | ### Instruction:
C++ тілінде 288468 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 288468; |
29,589,219 | kk | Unity | string_ops | intermediate | Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
3,905,390 | ru | Unity | var_decl | beginner | Как объявить переменную health со значением 118480 в Unity? | int health = 118480; | ### Instruction:
Как объявить переменную health со значением 118480 в Unity?
### Response:
int health = 118480; |
28,543,777 | kk | Python | array_ops | advanced | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
3,033,379 | kk | C# | var_decl | beginner | C# тілінде 267961 мәнімен level айнымалысын қалай жариялауға болады? | int level = 267961; | ### Instruction:
C# тілінде 267961 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 267961; |
102,028 | kk | C# | factorial | advanced | C# тілінде 2494 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(2494)); | ### Instruction:
C# тілінде 2494 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(2494)); |
51,769,890 | kk | Python | logic_ops | advanced | Python тилінде 1955 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1955
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1955 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1955
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,134,744 | en | Python | var_decl | beginner | How to declare a variable rate with value 302073 in Python? | rate = 302073 | ### Instruction:
How to declare a variable rate with value 302073 in Python?
### Response:
rate = 302073 |
61,807,338 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 2017 високосным. | public bool IsLeap() {
int y = 2017;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2017 високосным.
### Response:
public bool IsLeap() {
int y = 2017;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
61,263,761 | ru | Unity | string_ops | advanced | Напишите на Unity функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
2,593,492 | en | Unity | var_decl | beginner | How to declare a variable x with value 282182 in Unity? | int x = 282182; | ### Instruction:
How to declare a variable x with value 282182 in Unity?
### Response:
int x = 282182; |
43,054,420 | en | JavaScript | array_ops | intermediate | 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(); |
84,018,571 | ru | Java | array_ops | intermediate | Напишите на 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;
} |
18,097,899 | 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,831,540 | en | Java | var_decl | beginner | How to declare a variable score with value 423330 in Java? | int score = 423330; | ### Instruction:
How to declare a variable score with value 423330 in Java?
### Response:
int score = 423330; |
48,499,696 | 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;
} |
1,695,351 | kk | C++ | var_decl | beginner | C++ тілінде 369720 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 369720; | ### Instruction:
C++ тілінде 369720 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 369720; |
84,554,998 | en | Java | array_ops | intermediate | Write a function that finds the maximum number in an array in Java. | 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 Java.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
321,765 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 956. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(956)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 956.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(956)); |
2,424,889 | ru | Java | var_decl | beginner | Как объявить переменную data со значением 814240 в Java? | int data = 814240; | ### Instruction:
Как объявить переменную data со значением 814240 в Java?
### Response:
int data = 814240; |
79,058,708 | kk | Java | array_ops | advanced | Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
1,240,715 | kk | C# | var_decl | beginner | C# тілінде 479904 мәнімен index айнымалысын қалай жариялауға болады? | int index = 479904; | ### Instruction:
C# тілінде 479904 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 479904; |
64,722,753 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 83 простым. | def is_prime():
n = 83
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 83 простым.
### Response:
def is_prime():
n = 83
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.