id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
20,653,593
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);
652,575
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 7841.
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(7841) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 7841. ### 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(7841) << std::endl;
2,700,751
en
C#
var_decl
beginner
How to declare a variable speed with value 444713 in C#?
int speed = 444713;
### Instruction: How to declare a variable speed with value 444713 in C#? ### Response: int speed = 444713;
70,821
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 4828.
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(4828) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 4828. ### 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(4828) << std::endl;
26,442,705
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
42,097,148
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; }
2,500,256
ru
C++
var_decl
beginner
Как объявить переменную total со значением 441644 в C++?
int total = 441644;
### Instruction: Как объявить переменную total со значением 441644 в C++? ### Response: int total = 441644;
29,190,689
kk
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; }
557,614
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 7376.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7376))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 7376. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7376))
4,167,418
ru
C++
var_decl
beginner
Как объявить переменную amount со значением 469134 в C++?
int amount = 469134;
### Instruction: Как объявить переменную amount со значением 469134 в C++? ### Response: int amount = 469134;
388,350
kk
C#
var_decl
beginner
C# тілінде 813296 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 813296;
### Instruction: C# тілінде 813296 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 813296;
35,028,718
ru
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; }
80,113,182
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
65,427,756
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; }
48,954,432
kk
C#
logic_ops
intermediate
C# тилінде 1918 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1918; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1918 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1918; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,124,590
en
C++
var_decl
beginner
How to declare a variable speed with value 694096 in C++?
int speed = 694096;
### Instruction: How to declare a variable speed with value 694096 in C++? ### Response: int speed = 694096;
80,924,407
kk
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; }
2,135,992
ru
C#
var_decl
beginner
Как объявить переменную size со значением 175313 в C#?
int size = 175313;
### Instruction: Как объявить переменную size со значением 175313 в C#? ### Response: int size = 175313;
695,930
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 3087.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3087));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 3087. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3087));
62,997,137
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; }
476,863
kk
Java
var_decl
beginner
Java тілінде 919418 мәнімен value айнымалысын қалай жариялауға болады?
int value = 919418;
### Instruction: Java тілінде 919418 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 919418;
63,197,891
en
C#
string_ops
advanced
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(); }
889,776
kk
JavaScript
var_decl
beginner
JavaScript тілінде 623366 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 623366;
### Instruction: JavaScript тілінде 623366 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 623366;
29,747,187
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
912,508
ru
Java
var_decl
beginner
Как объявить переменную amount со значением 254092 в Java?
int amount = 254092;
### Instruction: Как объявить переменную amount со значением 254092 в Java? ### Response: int amount = 254092;
33,215,732
en
Unity
logic_ops
advanced
Write logic to check if the year 2056 is a leap year in Unity.
public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2056 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
105,704
kk
Java
factorial
advanced
Java тілінде 435 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(435));
### Instruction: Java тілінде 435 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(435));
54,664,365
kk
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; }
83,811,753
kk
C#
logic_ops
advanced
C# тилінде 419 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 419; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 419 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 419; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
94,752
kk
C++
factorial
advanced
C++ тілінде 4599 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4599) << std::endl;
### Instruction: C++ тілінде 4599 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4599) << std::endl;
4,789,919
kk
C#
var_decl
beginner
C# тілінде 23193 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 23193;
### Instruction: C# тілінде 23193 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 23193;
73,014,727
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 260 простым.
public bool IsPrime() { int n = 260; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 260 простым. ### Response: public bool IsPrime() { int n = 260; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
54,621,981
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 52 is prime in JavaScript.
function isPrime() { let n = 52; 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 52 is prime in JavaScript. ### Response: function isPrime() { let n = 52; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
99,948,220
en
JavaScript
string_ops
intermediate
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
64,278,055
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();
193,089
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 9965.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9965));
### Instruction: Write a function in Java that sums numbers from 1 to 9965. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9965));
94,678,583
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,744,346
ru
JavaScript
var_decl
beginner
Как объявить переменную level со значением 813826 в JavaScript?
let level = 813826;
### Instruction: Как объявить переменную level со значением 813826 в JavaScript? ### Response: let level = 813826;
86,315,842
en
C++
logic_ops
advanced
Write logic to check if the year 2044 is a leap year in C++.
public bool IsLeap() { int y = 2044; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2044 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2044; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
54,786,512
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); }
558,136
kk
Java
factorial
advanced
Java тілінде 9564 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9564));
### Instruction: Java тілінде 9564 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9564));
92,630,204
ru
Java
string_ops
advanced
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
64,107,132
kk
C#
logic_ops
advanced
C# тилінде 240 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 240; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 240 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 240; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
28,219,282
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1963 високосным.
public bool IsLeap() { int y = 1963; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1963 високосным. ### Response: public bool IsLeap() { int y = 1963; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
729,507
kk
Unity
factorial
advanced
Unity тілінде 9 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9)); }
### Instruction: Unity тілінде 9 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9)); }
70,200,158
kk
Unity
logic_ops
advanced
Unity тилінде 321 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 321; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 321 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 321; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
92,509,963
en
Python
logic_ops
advanced
Write logic to check if the year 2050 is a leap year in Python.
def is_leap(): year = 2050 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2050 is a leap year in Python. ### Response: def is_leap(): year = 2050 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
22,574,729
kk
Unity
string_ops
intermediate
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; }
50,753,314
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; }
72,397,446
kk
Python
logic_ops
intermediate
Python тилінде 1980 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1980 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1980 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1980 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
56,160,538
en
Python
string_ops
advanced
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
92,171,822
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); }
3,073,052
kk
Java
var_decl
beginner
Java тілінде 40350 мәнімен score айнымалысын қалай жариялауға болады?
int score = 40350;
### Instruction: Java тілінде 40350 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 40350;
443,135
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 2255.
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(2255) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 2255. ### 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(2255) << std::endl;
46,091,756
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
3,683,341
ru
JavaScript
var_decl
beginner
Как объявить переменную offset со значением 754403 в JavaScript?
let offset = 754403;
### Instruction: Как объявить переменную offset со значением 754403 в JavaScript? ### Response: let offset = 754403;
1,686,449
ru
Java
var_decl
beginner
Как объявить переменную total со значением 223921 в Java?
int total = 223921;
### Instruction: Как объявить переменную total со значением 223921 в Java? ### Response: int total = 223921;
100,528
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 2955.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2955))
### Instruction: Write a function in Python that calculates the factorial of 2955. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2955))
3,107,678
kk
Unity
var_decl
beginner
Unity тілінде 765810 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 765810;
### Instruction: Unity тілінде 765810 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 765810;
168,005
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 5048.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5048) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 5048. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5048) << std::endl;
2,397,903
ru
C#
var_decl
beginner
Как объявить переменную level со значением 287892 в C#?
int level = 287892;
### Instruction: Как объявить переменную level со значением 287892 в C#? ### Response: int level = 287892;
20,983,385
ru
Unity
logic_ops
advanced
Напишите на Unity функцию, определяющую, является ли число 194 простым.
public bool IsPrime() { int n = 194; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 194 простым. ### Response: public bool IsPrime() { int n = 194; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
89,021,022
kk
Python
logic_ops
advanced
Python тилінде 2023 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2023 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2023 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2023 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
2,957,847
en
C#
var_decl
beginner
How to declare a variable size with value 219745 in C#?
int size = 219745;
### Instruction: How to declare a variable size with value 219745 in C#? ### Response: int size = 219745;
89,922,597
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; }
49,006,301
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 112 простым.
public bool IsPrime() { int n = 112; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 112 простым. ### Response: public bool IsPrime() { int n = 112; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
85,669,523
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1965 високосным.
public bool IsLeap() { int y = 1965; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1965 високосным. ### Response: public bool IsLeap() { int y = 1965; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
81,989,935
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
1,254,437
en
C++
var_decl
beginner
How to declare a variable data with value 569348 in C++?
int data = 569348;
### Instruction: How to declare a variable data with value 569348 in C++? ### Response: int data = 569348;
15,815,411
kk
Java
string_ops
advanced
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; }
984,679
en
C++
var_decl
beginner
How to declare a variable timer with value 771645 in C++?
int timer = 771645;
### Instruction: How to declare a variable timer with value 771645 in C++? ### Response: int timer = 771645;
64,579,567
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1966 високосным.
public bool IsLeap() { int y = 1966; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1966 високосным. ### Response: public bool IsLeap() { int y = 1966; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
40,614,860
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; }
48,560,682
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
48,035,086
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1979 високосным.
def is_leap(): year = 1979 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1979 високосным. ### Response: def is_leap(): year = 1979 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
4,601,314
en
Unity
var_decl
beginner
How to declare a variable data with value 136355 in Unity?
int data = 136355;
### Instruction: How to declare a variable data with value 136355 in Unity? ### Response: int data = 136355;
63,085,581
kk
C#
logic_ops
advanced
C# тилінде 2004 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2004; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2004 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2004; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
48,042,421
en
Python
logic_ops
intermediate
Write a function that determines if the number 254 is prime in Python.
def is_prime(): n = 254 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 254 is prime in Python. ### Response: def is_prime(): n = 254 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
75,825,223
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
88,981,616
kk
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; }
3,426,836
en
JavaScript
var_decl
beginner
How to declare a variable amount with value 653225 in JavaScript?
let amount = 653225;
### Instruction: How to declare a variable amount with value 653225 in JavaScript? ### Response: let amount = 653225;
1,390,039
en
Unity
var_decl
beginner
How to declare a variable limit with value 287882 in Unity?
int limit = 287882;
### Instruction: How to declare a variable limit with value 287882 in Unity? ### Response: int limit = 287882;
4,831,768
en
Java
var_decl
beginner
How to declare a variable level with value 391527 in Java?
int level = 391527;
### Instruction: How to declare a variable level with value 391527 in Java? ### Response: int level = 391527;
939,253
kk
Python
var_decl
beginner
Python тілінде 918727 мәнімен x айнымалысын қалай жариялауға болады?
x = 918727
### Instruction: Python тілінде 918727 мәнімен x айнымалысын қалай жариялауға болады? ### Response: x = 918727
4,869,214
ru
C++
var_decl
beginner
Как объявить переменную health со значением 571082 в C++?
int health = 571082;
### Instruction: Как объявить переменную health со значением 571082 в C++? ### Response: int health = 571082;
4,858,916
ru
C++
var_decl
beginner
Как объявить переменную timer со значением 831268 в C++?
int timer = 831268;
### Instruction: Как объявить переменную timer со значением 831268 в C++? ### Response: int timer = 831268;
4,844,644
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 553615 в Python?
rate = 553615
### Instruction: Как объявить переменную rate со значением 553615 в Python? ### Response: rate = 553615
3,582,551
en
C++
var_decl
beginner
How to declare a variable timer with value 315891 in C++?
int timer = 315891;
### Instruction: How to declare a variable timer with value 315891 in C++? ### Response: int timer = 315891;
46,971,372
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); }
36,561,567
en
Unity
logic_ops
advanced
Write a function that determines if the number 487 is prime in Unity.
public bool IsPrime() { int n = 487; 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 487 is prime in Unity. ### Response: public bool IsPrime() { int n = 487; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
79,111,435
en
Python
array_ops
advanced
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]
32,402,144
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; }
982,107
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 507819 в C#?
int buffer = 507819;
### Instruction: Как объявить переменную buffer со значением 507819 в C#? ### Response: int buffer = 507819;
69,667,968
kk
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; }
1,306,866
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 750895 в Java?
int rate = 750895;
### Instruction: Как объявить переменную rate со значением 750895 в Java? ### Response: int rate = 750895;
47,196
kk
C#
sum_n
intermediate
C# тілінде 1-ден 4168-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4168));
### Instruction: C# тілінде 1-ден 4168-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4168));
2,204,199
ru
Unity
var_decl
beginner
Как объявить переменную offset со значением 327347 в Unity?
int offset = 327347;
### Instruction: Как объявить переменную offset со значением 327347 в Unity? ### Response: int offset = 327347;
90,969,000
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; }
2,953,688
kk
C#
var_decl
beginner
C# тілінде 57326 мәнімен level айнымалысын қалай жариялауға болады?
int level = 57326;
### Instruction: C# тілінде 57326 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 57326;
204,293
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 8541-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8541));
### Instruction: JavaScript тілінде 1-ден 8541-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8541));