id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
61,822,558
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; }
70,381,737
kk
Python
logic_ops
advanced
Python тилінде 1985 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1985 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1985 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1985 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
56,277,195
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
82,509,795
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; }
19,156,993
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 441 простым.
function isPrime() { let n = 441; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 441 простым. ### Response: function isPrime() { let n = 441; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
55,332,661
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
3,078,705
kk
JavaScript
var_decl
beginner
JavaScript тілінде 311021 мәнімен count айнымалысын қалай жариялауға болады?
let count = 311021;
### Instruction: JavaScript тілінде 311021 мәнімен count айнымалысын қалай жариялауға болады? ### Response: let count = 311021;
4,635,603
ru
C++
var_decl
beginner
Как объявить переменную x со значением 442513 в C++?
int x = 442513;
### Instruction: Как объявить переменную x со значением 442513 в C++? ### Response: int x = 442513;
66,957,405
en
Java
logic_ops
intermediate
Write a function that determines if the number 107 is prime in Java.
public bool IsPrime() { int n = 107; 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 107 is prime in Java. ### Response: public bool IsPrime() { int n = 107; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
75,777,567
en
Java
logic_ops
advanced
Write logic to check if the year 1989 is a leap year in Java.
public bool IsLeap() { int y = 1989; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1989 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1989; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,649,259
kk
C++
var_decl
beginner
C++ тілінде 375091 мәнімен size айнымалысын қалай жариялауға болады?
int size = 375091;
### Instruction: C++ тілінде 375091 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 375091;
1,929,286
kk
Java
var_decl
beginner
Java тілінде 91942 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 91942;
### Instruction: Java тілінде 91942 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 91942;
3,033,913
kk
C#
var_decl
beginner
C# тілінде 175985 мәнімен score айнымалысын қалай жариялауға болады?
int score = 175985;
### Instruction: C# тілінде 175985 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 175985;
46,738,050
en
C#
logic_ops
intermediate
Write a function that determines if the number 473 is prime in C#.
public bool IsPrime() { int n = 473; 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 473 is prime in C#. ### Response: public bool IsPrime() { int n = 473; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,802,379
kk
C++
var_decl
beginner
C++ тілінде 166675 мәнімен index айнымалысын қалай жариялауға болады?
int index = 166675;
### Instruction: C++ тілінде 166675 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 166675;
78,192,342
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; }
64,105,389
en
Python
array_ops
advanced
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
55,423,743
ru
C++
logic_ops
advanced
Напишите на 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); }
85,027,043
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1935 is a leap year in JavaScript.
function isLeap() { let y = 1935; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1935 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1935; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
679,529
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 4672.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4672)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 4672. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4672)); }
37,388,418
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1935 високосным.
def is_leap(): year = 1935 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1935 високосным. ### Response: def is_leap(): year = 1935 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
35,344,951
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
17,784,405
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 441 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 441; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 441 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 441; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
51,593,661
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
99,266,769
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 277 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 277; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 277 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 277; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,830,079
ru
C++
var_decl
beginner
Как объявить переменную size со значением 477642 в C++?
int size = 477642;
### Instruction: Как объявить переменную size со значением 477642 в C++? ### Response: int size = 477642;
46,013,701
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
33,483,776
en
Java
array_ops
intermediate
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); }
2,865,456
en
Python
var_decl
beginner
How to declare a variable x with value 123458 in Python?
x = 123458
### Instruction: How to declare a variable x with value 123458 in Python? ### Response: x = 123458
12,620,672
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; }
92,073,574
kk
C#
logic_ops
advanced
C# тилінде 124 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 124; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 124 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 124; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
38,447,277
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; }
11,123,128
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('');
47,773,221
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2009 високосным.
def is_leap(): year = 2009 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2009 високосным. ### Response: def is_leap(): year = 2009 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
58,306,567
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,304,210
ru
C#
var_decl
beginner
Как объявить переменную amount со значением 699430 в C#?
int amount = 699430;
### Instruction: Как объявить переменную amount со значением 699430 в C#? ### Response: int amount = 699430;
32,935,000
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; }
30,616,094
en
C++
logic_ops
advanced
Write a function that determines if the number 489 is prime in C++.
public bool IsPrime() { int n = 489; 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 489 is prime in C++. ### Response: public bool IsPrime() { int n = 489; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,107,246
ru
Java
var_decl
beginner
Как объявить переменную weight со значением 190610 в Java?
int weight = 190610;
### Instruction: Как объявить переменную weight со значением 190610 в Java? ### Response: int weight = 190610;
48,273,417
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 64 простым.
public bool IsPrime() { int n = 64; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 64 простым. ### Response: public bool IsPrime() { int n = 64; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
37,513,906
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(); }
1,292,566
ru
Python
var_decl
beginner
Как объявить переменную level со значением 866702 в Python?
level = 866702
### Instruction: Как объявить переменную level со значением 866702 в Python? ### Response: level = 866702
4,361,493
en
Java
var_decl
beginner
How to declare a variable weight with value 454852 in Java?
int weight = 454852;
### Instruction: How to declare a variable weight with value 454852 in Java? ### Response: int weight = 454852;
4,549,540
en
JavaScript
var_decl
beginner
How to declare a variable amount with value 772756 in JavaScript?
let amount = 772756;
### Instruction: How to declare a variable amount with value 772756 in JavaScript? ### Response: let amount = 772756;
54,560,815
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; }
3,058,154
kk
JavaScript
var_decl
beginner
JavaScript тілінде 347378 мәнімен value айнымалысын қалай жариялауға болады?
let value = 347378;
### Instruction: JavaScript тілінде 347378 мәнімен value айнымалысын қалай жариялауға болады? ### Response: let value = 347378;
51,172,887
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; }
1,286,684
en
JavaScript
var_decl
beginner
How to declare a variable data with value 130998 in JavaScript?
let data = 130998;
### Instruction: How to declare a variable data with value 130998 in JavaScript? ### Response: let data = 130998;
4,196,966
en
Python
var_decl
beginner
How to declare a variable result with value 454739 in Python?
result = 454739
### Instruction: How to declare a variable result with value 454739 in Python? ### Response: result = 454739
3,591,467
kk
C#
var_decl
beginner
C# тілінде 880627 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 880627;
### Instruction: C# тілінде 880627 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 880627;
83,413,675
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1979 високосным.
public bool IsLeap() { int y = 1979; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1979 високосным. ### Response: public bool IsLeap() { int y = 1979; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
54,894,919
kk
C++
logic_ops
intermediate
C++ тилінде 1989 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1989; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1989 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1989; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,770,283
ru
C++
var_decl
beginner
Как объявить переменную x со значением 901477 в C++?
int x = 901477;
### Instruction: Как объявить переменную x со значением 901477 в C++? ### Response: int x = 901477;
34,790,087
en
Unity
array_ops
intermediate
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
1,373,547
kk
Java
var_decl
beginner
Java тілінде 326164 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 326164;
### Instruction: Java тілінде 326164 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 326164;
12,221,761
kk
Python
array_ops
advanced
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]
183,745
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 1834.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(1834));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 1834. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(1834));
2,082,428
kk
C#
var_decl
beginner
C# тілінде 757230 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 757230;
### Instruction: C# тілінде 757230 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 757230;
74,033,668
kk
Python
logic_ops
intermediate
Python тилінде 193 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 193 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 193 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 193 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
87,330,743
en
Unity
logic_ops
advanced
Write logic to check if the year 1919 is a leap year in Unity.
public bool IsLeap() { int y = 1919; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1919 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1919; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
47,454,332
ru
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; }
1,068,228
kk
Java
var_decl
beginner
Java тілінде 531478 мәнімен data айнымалысын қалай жариялауға болады?
int data = 531478;
### Instruction: Java тілінде 531478 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 531478;
132,690
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 5329.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5329));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 5329. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5329));
89,701,756
kk
Unity
logic_ops
intermediate
Unity тилінде 2031 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2031; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2031 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2031; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
96,981,783
en
Unity
logic_ops
advanced
Write a function that determines if the number 74 is prime in Unity.
public bool IsPrime() { int n = 74; 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 74 is prime in Unity. ### Response: public bool IsPrime() { int n = 74; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
17,788,524
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]
606,512
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 6870.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6870));
### Instruction: Write a function in Java that sums numbers from 1 to 6870. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6870));
21,657,317
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;
672,198
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 1664-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(1664) << std::endl;
### Instruction: C++ тілінде 1-ден 1664-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(1664) << std::endl;
11,028,158
kk
C#
string_ops
intermediate
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
33,060,135
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; }
54,451,784
ru
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); }
24,584,568
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 328 is prime in JavaScript.
function isPrime() { let n = 328; 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 328 is prime in JavaScript. ### Response: function isPrime() { let n = 328; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
59,719,912
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 1971 високосным.
public bool IsLeap() { int y = 1971; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1971 високосным. ### Response: public bool IsLeap() { int y = 1971; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
72,564,479
kk
Unity
logic_ops
advanced
Unity тилінде 177 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 177; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 177 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 177; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
77,667,470
kk
Unity
logic_ops
intermediate
Unity тилінде 492 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 492; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 492 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 492; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
22,274,483
en
C++
string_ops
intermediate
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; }
99,975,792
kk
Python
string_ops
intermediate
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
90,934,498
en
Java
logic_ops
intermediate
Write a function that determines if the number 129 is prime in Java.
public bool IsPrime() { int n = 129; 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 129 is prime in Java. ### Response: public bool IsPrime() { int n = 129; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
609,680
ru
C#
var_decl
beginner
Как объявить переменную size со значением 897610 в C#?
int size = 897610;
### Instruction: Как объявить переменную size со значением 897610 в C#? ### Response: int size = 897610;
77,425,201
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; }
21,673,518
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(); }
1,889,101
ru
Unity
var_decl
beginner
Как объявить переменную value со значением 588062 в Unity?
int value = 588062;
### Instruction: Как объявить переменную value со значением 588062 в Unity? ### Response: int value = 588062;
90,604,444
kk
Java
logic_ops
advanced
Java тилінде 34 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 34; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 34 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 34; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
22,944,512
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
27,455,638
kk
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; }
75,086,657
kk
Unity
logic_ops
advanced
Unity тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2081; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2081; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
92,568,827
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; }
63,716,537
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); }
86,445,804
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
44,711,228
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; }
1,444,113
ru
C++
var_decl
beginner
Как объявить переменную level со значением 578458 в C++?
int level = 578458;
### Instruction: Как объявить переменную level со значением 578458 в C++? ### Response: int level = 578458;
24,134,137
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();
57,985
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 8989.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8989)); }
### Instruction: Write a function in Unity that calculates the factorial of 8989. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8989)); }
17,303,497
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
1,502,032
kk
JavaScript
var_decl
beginner
JavaScript тілінде 382988 мәнімен buffer айнымалысын қалай жариялауға болады?
let buffer = 382988;
### Instruction: JavaScript тілінде 382988 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: let buffer = 382988;
2,427,625
ru
Unity
var_decl
beginner
Как объявить переменную count со значением 499211 в Unity?
int count = 499211;
### Instruction: Как объявить переменную count со значением 499211 в Unity? ### Response: int count = 499211;
16,276,124
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; }
43,376,502
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; }
738,372
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 912930 в Java?
int rate = 912930;
### Instruction: Как объявить переменную rate со значением 912930 в Java? ### Response: int rate = 912930;