id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
27,089,236
en
JavaScript
string_ops
advanced
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('');
10,572,914
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; }
75,731,406
ru
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аеёиоуыэюя')
4,000,403
en
Python
var_decl
beginner
How to declare a variable health with value 410111 in Python?
health = 410111
### Instruction: How to declare a variable health with value 410111 in Python? ### Response: health = 410111
3,597,043
kk
C++
var_decl
beginner
C++ тілінде 276605 мәнімен score айнымалысын қалай жариялауға болады?
int score = 276605;
### Instruction: C++ тілінде 276605 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 276605;
406,724
ru
JavaScript
var_decl
beginner
Как объявить переменную count со значением 561506 в JavaScript?
let count = 561506;
### Instruction: Как объявить переменную count со значением 561506 в JavaScript? ### Response: let count = 561506;
3,287,791
ru
Python
var_decl
beginner
Как объявить переменную total со значением 552719 в Python?
total = 552719
### Instruction: Как объявить переменную total со значением 552719 в Python? ### Response: total = 552719
61,949,664
kk
Unity
logic_ops
advanced
Unity тилінде 351 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 351; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 351 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 351; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
50,828,056
kk
Java
logic_ops
intermediate
Java тилінде 82 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 82; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 82 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 82; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
268,594
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 1947.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1947) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 1947. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1947) << std::endl;
3,619,940
kk
Java
var_decl
beginner
Java тілінде 698818 мәнімен result айнымалысын қалай жариялауға болады?
int result = 698818;
### Instruction: Java тілінде 698818 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 698818;
50,718,066
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
688,859
ru
Python
var_decl
beginner
Как объявить переменную count со значением 905921 в Python?
count = 905921
### Instruction: Как объявить переменную count со значением 905921 в Python? ### Response: count = 905921
98,364,926
kk
C#
logic_ops
advanced
C# тилінде 2072 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2072; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2072 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2072; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
23,782,706
en
C++
logic_ops
advanced
Write logic to check if the year 2060 is a leap year in C++.
public bool IsLeap() { int y = 2060; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2060 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2060; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
33,064
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 6400.
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(6400) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 6400. ### 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(6400) << std::endl;
45,036,997
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; }
81,428
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 6421.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6421))
### Instruction: Write a function in Python that sums numbers from 1 to 6421. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6421))
40,822,567
kk
Java
logic_ops
advanced
Java тилінде 1974 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1974; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1974 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1974; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,908,416
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 347688 в Java?
int rate = 347688;
### Instruction: Как объявить переменную rate со значением 347688 в Java? ### Response: int rate = 347688;
58,452,557
kk
Unity
logic_ops
advanced
Unity тилінде 1902 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1902 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
32,724,156
en
Python
string_ops
intermediate
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]
80,839
kk
JavaScript
factorial
advanced
JavaScript тілінде 1839 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1839));
### Instruction: JavaScript тілінде 1839 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1839));
69,123,317
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1928 високосным.
public bool IsLeap() { int y = 1928; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1928 високосным. ### Response: public bool IsLeap() { int y = 1928; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,186,560
kk
C#
var_decl
beginner
C# тілінде 290606 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 290606;
### Instruction: C# тілінде 290606 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 290606;
36,482,963
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; }
87,910,969
en
C++
logic_ops
advanced
Write a function that determines if the number 39 is prime in C++.
public bool IsPrime() { int n = 39; 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 39 is prime in C++. ### Response: public bool IsPrime() { int n = 39; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
20,105,895
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; }
86,693,122
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 2059 високосным.
public bool IsLeap() { int y = 2059; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2059 високосным. ### Response: public bool IsLeap() { int y = 2059; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
34,267,454
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2069 високосным.
def is_leap(): year = 2069 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2069 високосным. ### Response: def is_leap(): year = 2069 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
19,527,088
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
720,560
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 6729.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(6729));
### Instruction: Write a function in C# that calculates the factorial of 6729. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(6729));
21,197,427
kk
Python
logic_ops
intermediate
Python тилінде 79 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 79 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 79 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 79 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
2,326,150
ru
C#
var_decl
beginner
Как объявить переменную value со значением 982342 в C#?
int value = 982342;
### Instruction: Как объявить переменную value со значением 982342 в C#? ### Response: int value = 982342;
479,019
kk
C#
sum_n
intermediate
C# тілінде 1-ден 6665-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6665));
### Instruction: C# тілінде 1-ден 6665-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6665));
90,418,064
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); }
3,154,467
en
JavaScript
var_decl
beginner
How to declare a variable buffer with value 959430 in JavaScript?
let buffer = 959430;
### Instruction: How to declare a variable buffer with value 959430 in JavaScript? ### Response: let buffer = 959430;
1,613,071
kk
C++
var_decl
beginner
C++ тілінде 923123 мәнімен result айнымалысын қалай жариялауға болады?
int result = 923123;
### Instruction: C++ тілінде 923123 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 923123;
178,480
kk
C#
sum_n
intermediate
C# тілінде 1-ден 2301-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2301));
### Instruction: C# тілінде 1-ден 2301-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2301));
4,416,973
en
Unity
var_decl
beginner
How to declare a variable total with value 46687 in Unity?
int total = 46687;
### Instruction: How to declare a variable total with value 46687 in Unity? ### Response: int total = 46687;
143,033
kk
Java
var_decl
beginner
Java тілінде 345320 мәнімен score айнымалысын қалай жариялауға болады?
int score = 345320;
### Instruction: Java тілінде 345320 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 345320;
24,741,342
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
64,863,929
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();
39,088,454
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; }
195,610
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 1438.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(1438));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 1438. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(1438));
4,809,289
kk
Unity
var_decl
beginner
Unity тілінде 699468 мәнімен size айнымалысын қалай жариялауға болады?
int size = 699468;
### Instruction: Unity тілінде 699468 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 699468;
33,461,672
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]
3,142,943
kk
C#
var_decl
beginner
C# тілінде 547023 мәнімен health айнымалысын қалай жариялауға болады?
int health = 547023;
### Instruction: C# тілінде 547023 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 547023;
57,206,508
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; }
85,790,355
ru
C#
array_ops
advanced
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
79,197,933
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 328 простым.
def is_prime(): n = 328 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 328 простым. ### Response: def is_prime(): n = 328 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
2,799,891
kk
Python
var_decl
beginner
Python тілінде 93605 мәнімен buffer айнымалысын қалай жариялауға болады?
buffer = 93605
### Instruction: Python тілінде 93605 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: buffer = 93605
102,685
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 3016.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3016));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 3016. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3016));
2,954,200
ru
Unity
var_decl
beginner
Как объявить переменную amount со значением 41091 в Unity?
int amount = 41091;
### Instruction: Как объявить переменную amount со значением 41091 в Unity? ### Response: int amount = 41091;
610,492
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 531.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(531)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 531. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(531)); }
84,232,585
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); }
331,144
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 2037.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2037)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 2037. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2037)); }
125,813
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 6105.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6105));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 6105. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6105));
54,012,825
kk
Python
string_ops
advanced
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
911,965
kk
JavaScript
var_decl
beginner
JavaScript тілінде 53943 мәнімен amount айнымалысын қалай жариялауға болады?
let amount = 53943;
### Instruction: JavaScript тілінде 53943 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: let amount = 53943;
10,480,877
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; }
77,357,418
ru
Unity
array_ops
advanced
Напишите на 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; }
84,854,394
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 326 простым.
def is_prime(): n = 326 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 326 простым. ### Response: def is_prime(): n = 326 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,245,277
kk
Java
var_decl
beginner
Java тілінде 936453 мәнімен x айнымалысын қалай жариялауға болады?
int x = 936453;
### Instruction: Java тілінде 936453 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 936453;
18,878,747
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; }
99,432
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 4846.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4846)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 4846. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4846)); }
4,634,163
ru
Unity
var_decl
beginner
Как объявить переменную score со значением 964713 в Unity?
int score = 964713;
### Instruction: Как объявить переменную score со значением 964713 в Unity? ### Response: int score = 964713;
123,512
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 3295.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3295))
### Instruction: Write a function in Python that sums numbers from 1 to 3295. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3295))
84,818,137
en
Unity
logic_ops
advanced
Write a function that determines if the number 288 is prime in Unity.
public bool IsPrime() { int n = 288; 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 288 is prime in Unity. ### Response: public bool IsPrime() { int n = 288; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
28,346,583
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; }
86,159,074
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; }
16,594,082
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; }
76,568
kk
JavaScript
var_decl
beginner
JavaScript тілінде 436391 мәнімен x айнымалысын қалай жариялауға болады?
let x = 436391;
### Instruction: JavaScript тілінде 436391 мәнімен x айнымалысын қалай жариялауға болады? ### Response: let x = 436391;
54,114,295
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
1,829,952
ru
Unity
var_decl
beginner
Как объявить переменную weight со значением 908555 в Unity?
int weight = 908555;
### Instruction: Как объявить переменную weight со значением 908555 в Unity? ### Response: int weight = 908555;
3,846,759
ru
C++
var_decl
beginner
Как объявить переменную score со значением 989130 в C++?
int score = 989130;
### Instruction: Как объявить переменную score со значением 989130 в C++? ### Response: int score = 989130;
83,845,160
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
21,411,814
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; }
1,241,611
ru
C#
var_decl
beginner
Как объявить переменную score со значением 949329 в C#?
int score = 949329;
### Instruction: Как объявить переменную score со значением 949329 в C#? ### Response: int score = 949329;
3,752,100
kk
C#
var_decl
beginner
C# тілінде 765092 мәнімен value айнымалысын қалай жариялауға болады?
int value = 765092;
### Instruction: C# тілінде 765092 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 765092;
33,094,494
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); }
74,908,693
kk
C#
array_ops
advanced
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
4,974,468
en
JavaScript
var_decl
beginner
How to declare a variable result with value 631813 in JavaScript?
let result = 631813;
### Instruction: How to declare a variable result with value 631813 in JavaScript? ### Response: let result = 631813;
3,286,505
kk
C++
var_decl
beginner
C++ тілінде 31337 мәнімен y айнымалысын қалай жариялауға болады?
int y = 31337;
### Instruction: C++ тілінде 31337 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 31337;
2,291,613
kk
Python
var_decl
beginner
Python тілінде 440620 мәнімен speed айнымалысын қалай жариялауға болады?
speed = 440620
### Instruction: Python тілінде 440620 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: speed = 440620
23,590,867
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1923 високосным.
public bool IsLeap() { int y = 1923; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1923 високосным. ### Response: public bool IsLeap() { int y = 1923; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
55,907,747
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 369 простым.
def is_prime(): n = 369 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 369 простым. ### Response: def is_prime(): n = 369 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
25,515,817
kk
Unity
logic_ops
advanced
Unity тилінде 2088 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2088; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2088 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2088; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
93,597,995
kk
Java
logic_ops
advanced
Java тилінде 323 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 323; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 323 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 323; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
58,217,387
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1949 високосным.
public bool IsLeap() { int y = 1949; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1949 високосным. ### Response: public bool IsLeap() { int y = 1949; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
17,839,827
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;
1,734,952
en
JavaScript
var_decl
beginner
How to declare a variable timer with value 203298 in JavaScript?
let timer = 203298;
### Instruction: How to declare a variable timer with value 203298 in JavaScript? ### Response: let timer = 203298;
37,765,748
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; }
785,473
en
Java
var_decl
beginner
How to declare a variable count with value 44136 in Java?
int count = 44136;
### Instruction: How to declare a variable count with value 44136 in Java? ### Response: int count = 44136;
60,926,408
kk
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; }
62,105,695
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; }
85,469,044
en
C#
logic_ops
intermediate
Write a function that determines if the number 457 is prime in C#.
public bool IsPrime() { int n = 457; 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 457 is prime in C#. ### Response: public bool IsPrime() { int n = 457; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
48,276,337
kk
Java
logic_ops
intermediate
Java тилінде 446 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 446; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 446 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 446; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
445,318
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 2227-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2227)); }
### Instruction: Unity тілінде 1-ден 2227-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2227)); }
1,066,825
en
Unity
var_decl
beginner
How to declare a variable amount with value 873616 in Unity?
int amount = 873616;
### Instruction: How to declare a variable amount with value 873616 in Unity? ### Response: int amount = 873616;