id
int64
0
100M
language
stringclasses
3 values
prog_lang
stringclasses
6 values
category
stringclasses
10 values
difficulty
stringclasses
3 values
instruction
stringlengths
30
86
output
stringlengths
7
192
text
stringlengths
92
300
31,775
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 4486.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4486));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 4486. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4486));
4,833,162
ru
C#
var_decl
beginner
Как объявить переменную x со значением 763731 в C#?
int x = 763731;
### Instruction: Как объявить переменную x со значением 763731 в C#? ### Response: int x = 763731;
384,413
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 6592.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6592)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 6592. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6592)); }
20,267,568
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,480,979
kk
Python
var_decl
beginner
Python тілінде 318691 мәнімен count айнымалысын қалай жариялауға болады?
count = 318691
### Instruction: Python тілінде 318691 мәнімен count айнымалысын қалай жариялауға болады? ### Response: count = 318691
61,870,227
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
2,644,663
ru
JavaScript
var_decl
beginner
Как объявить переменную count со значением 753058 в JavaScript?
let count = 753058;
### Instruction: Как объявить переменную count со значением 753058 в JavaScript? ### Response: let count = 753058;
31,501,494
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();
45,209,567
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; }
470,253
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 5881.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(5881));
### Instruction: Write a function in C# that sums numbers from 1 to 5881. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(5881));
89,187,059
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1966 високосным.
function isLeap() { let y = 1966; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1966 високосным. ### Response: function isLeap() { let y = 1966; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
20,579,380
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2047 is a leap year in JavaScript.
function isLeap() { let y = 2047; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2047 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2047; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
91,609,484
en
JavaScript
array_ops
advanced
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
32,959,759
kk
Java
array_ops
intermediate
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
2,915,334
kk
C#
var_decl
beginner
C# тілінде 283487 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 283487;
### Instruction: C# тілінде 283487 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 283487;
318,715
kk
Python
factorial
advanced
Python тілінде 4638 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(4638))
### Instruction: Python тілінде 4638 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(4638))
90,874,673
ru
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; }
60,692,231
en
Java
string_ops
advanced
Write a function that counts vowels in a text in Java.
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 Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
43,331,031
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; }
2,559,184
ru
C#
var_decl
beginner
Как объявить переменную amount со значением 969807 в C#?
int amount = 969807;
### Instruction: Как объявить переменную amount со значением 969807 в C#? ### Response: int amount = 969807;
74,798,190
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,359,618
kk
JavaScript
var_decl
beginner
JavaScript тілінде 188893 мәнімен offset айнымалысын қалай жариялауға болады?
let offset = 188893;
### Instruction: JavaScript тілінде 188893 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: let offset = 188893;
96,153,057
ru
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]
4,428,893
en
C++
var_decl
beginner
How to declare a variable data with value 993631 in C++?
int data = 993631;
### Instruction: How to declare a variable data with value 993631 in C++? ### Response: int data = 993631;
22,782,388
en
Python
string_ops
advanced
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
53,601,770
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; }
3,157,483
ru
Unity
var_decl
beginner
Как объявить переменную index со значением 23372 в Unity?
int index = 23372;
### Instruction: Как объявить переменную index со значением 23372 в Unity? ### Response: int index = 23372;
97,251,329
kk
Java
logic_ops
advanced
Java тилінде 2050 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2050; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2050 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2050; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
10,785,689
ru
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); }
19,607,994
en
Unity
string_ops
intermediate
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(); }
27,684,505
en
C#
logic_ops
advanced
Write logic to check if the year 1923 is a leap year in C#.
public bool IsLeap() { int y = 1923; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1923 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1923; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
437,068
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 3673-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3673));
### Instruction: JavaScript тілінде 1-ден 3673-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3673));
3,138,220
ru
C#
var_decl
beginner
Как объявить переменную size со значением 11103 в C#?
int size = 11103;
### Instruction: Как объявить переменную size со значением 11103 в C#? ### Response: int size = 11103;
60,294,417
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1932 високосным.
public bool IsLeap() { int y = 1932; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1932 високосным. ### Response: public bool IsLeap() { int y = 1932; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,704,944
en
C#
var_decl
beginner
How to declare a variable result with value 873071 in C#?
int result = 873071;
### Instruction: How to declare a variable result with value 873071 in C#? ### Response: int result = 873071;
37,216,206
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 237 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 237; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 237 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 237; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
58,189,019
en
C++
logic_ops
intermediate
Write logic to check if the year 2073 is a leap year in C++.
public bool IsLeap() { int y = 2073; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2073 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2073; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,599,300
en
C#
var_decl
beginner
How to declare a variable rate with value 344689 in C#?
int rate = 344689;
### Instruction: How to declare a variable rate with value 344689 in C#? ### Response: int rate = 344689;
89,656,806
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
18,923,897
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
78,062,378
kk
Unity
logic_ops
advanced
Unity тилінде 2051 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2051; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2051 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2051; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
39,241,811
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; }
3,279,596
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 369103 в JavaScript?
let total = 369103;
### Instruction: Как объявить переменную total со значением 369103 в JavaScript? ### Response: let total = 369103;
93,042,767
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;
89,752,552
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(); }
2,020,931
en
C++
var_decl
beginner
How to declare a variable speed with value 303206 in C++?
int speed = 303206;
### Instruction: How to declare a variable speed with value 303206 in C++? ### Response: int speed = 303206;
4,499,701
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 327702 в C#?
int buffer = 327702;
### Instruction: Как объявить переменную buffer со значением 327702 в C#? ### Response: int buffer = 327702;
31,529,475
ru
Python
string_ops
advanced
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
254,145
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 6245.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(6245));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 6245. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(6245));
2,920,241
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 225904 в JavaScript?
let y = 225904;
### Instruction: Как объявить переменную y со значением 225904 в JavaScript? ### Response: let y = 225904;
2,445,410
ru
Unity
var_decl
beginner
Как объявить переменную limit со значением 536104 в Unity?
int limit = 536104;
### Instruction: Как объявить переменную limit со значением 536104 в Unity? ### Response: int limit = 536104;
631,293
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 2151.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2151));
### Instruction: Write a function in JavaScript that calculates the factorial of 2151. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2151));
91,220,938
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 168 простым.
public bool IsPrime() { int n = 168; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 168 простым. ### Response: public bool IsPrime() { int n = 168; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
39,765,002
ru
Java
string_ops
intermediate
Напишите на 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; }
87,745,716
en
Python
logic_ops
intermediate
Write logic to check if the year 2027 is a leap year in Python.
def is_leap(): year = 2027 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2027 is a leap year in Python. ### Response: def is_leap(): year = 2027 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
34,346,387
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]
21,080,035
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 68 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 68; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 68 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 68; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
774,892
kk
Java
var_decl
beginner
Java тілінде 871279 мәнімен result айнымалысын қалай жариялауға болады?
int result = 871279;
### Instruction: Java тілінде 871279 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 871279;
83,997,511
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,211,464
ru
Python
var_decl
beginner
Как объявить переменную index со значением 433406 в Python?
index = 433406
### Instruction: Как объявить переменную index со значением 433406 в Python? ### Response: index = 433406
833,939
ru
Unity
var_decl
beginner
Как объявить переменную data со значением 925460 в Unity?
int data = 925460;
### Instruction: Как объявить переменную data со значением 925460 в Unity? ### Response: int data = 925460;
333,750
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 2875-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2875));
### Instruction: JavaScript тілінде 1-ден 2875-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2875));
30,904,469
en
Java
string_ops
intermediate
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
80,272,628
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; }
48,633,991
en
Java
string_ops
intermediate
Write a function that counts vowels in a text in Java.
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 Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
58,715,939
kk
Java
string_ops
advanced
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
4,967,528
kk
Java
var_decl
beginner
Java тілінде 694258 мәнімен total айнымалысын қалай жариялауға болады?
int total = 694258;
### Instruction: Java тілінде 694258 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 694258;
17,050,652
kk
C++
logic_ops
intermediate
C++ тилінде 1907 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1907; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1907 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1907; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,790,284
ru
Unity
var_decl
beginner
Как объявить переменную score со значением 393055 в Unity?
int score = 393055;
### Instruction: Как объявить переменную score со значением 393055 в Unity? ### Response: int score = 393055;
82,293,368
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; }
740,873
ru
Python
var_decl
beginner
Как объявить переменную score со значением 106446 в Python?
score = 106446
### Instruction: Как объявить переменную score со значением 106446 в Python? ### Response: score = 106446
847,541
kk
Java
var_decl
beginner
Java тілінде 952661 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 952661;
### Instruction: Java тілінде 952661 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 952661;
2,119,728
en
Python
var_decl
beginner
How to declare a variable size with value 220658 in Python?
size = 220658
### Instruction: How to declare a variable size with value 220658 in Python? ### Response: size = 220658
2,708,684
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 31117 in JavaScript?
let limit = 31117;
### Instruction: How to declare a variable limit with value 31117 in JavaScript? ### Response: let limit = 31117;
700,744
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 5289.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5289));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 5289. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5289));
48,533,684
en
JavaScript
logic_ops
advanced
Write logic to check if the year 2071 is a leap year in JavaScript.
function isLeap() { let y = 2071; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2071 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2071; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
48,331,309
en
Unity
logic_ops
advanced
Write logic to check if the year 2065 is a leap year in Unity.
public bool IsLeap() { int y = 2065; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2065 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2065; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
379,856
kk
C#
sum_n
intermediate
C# тілінде 1-ден 4867-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4867));
### Instruction: C# тілінде 1-ден 4867-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4867));
181,044
kk
Unity
factorial
advanced
Unity тілінде 4656 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4656)); }
### Instruction: Unity тілінде 4656 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4656)); }
84,849,111
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; }
75,410,670
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C++ функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
28,816,278
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аеёиоуыэюя')
1,434,647
kk
C#
var_decl
beginner
C# тілінде 325872 мәнімен data айнымалысын қалай жариялауға болады?
int data = 325872;
### Instruction: C# тілінде 325872 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 325872;
2,596,277
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 817943 в C++?
int buffer = 817943;
### Instruction: Как объявить переменную buffer со значением 817943 в C++? ### Response: int buffer = 817943;
71,871,690
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(); }
50,963,223
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
26,962,727
en
C#
array_ops
intermediate
Write a function that reverses a list in C#.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C#. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
181,866
kk
Java
sum_n
intermediate
Java тілінде 1-ден 7739-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7739));
### Instruction: Java тілінде 1-ден 7739-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7739));
319,891
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 9713.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9713));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 9713. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9713));
2,921,493
ru
Python
var_decl
beginner
Как объявить переменную count со значением 946971 в Python?
count = 946971
### Instruction: Как объявить переменную count со значением 946971 в Python? ### Response: count = 946971
754,976
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 961.
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(961) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 961. ### 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(961) << std::endl;
57,572,360
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]
4,376,704
kk
Unity
var_decl
beginner
Unity тілінде 811130 мәнімен x айнымалысын қалай жариялауға болады?
int x = 811130;
### Instruction: Unity тілінде 811130 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 811130;
88,718,665
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
11,227,200
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; }
20,056,208
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 28 простым.
public bool IsPrime() { int n = 28; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 28 простым. ### Response: public bool IsPrime() { int n = 28; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
45,516,764
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1948 is a leap year in JavaScript.
function isLeap() { let y = 1948; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1948 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1948; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
29,848,553
en
Unity
logic_ops
advanced
Write a function that determines if the number 121 is prime in Unity.
public bool IsPrime() { int n = 121; 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 121 is prime in Unity. ### Response: public bool IsPrime() { int n = 121; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,417,028
kk
Java
var_decl
beginner
Java тілінде 599328 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 599328;
### Instruction: Java тілінде 599328 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 599328;
535,813
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 3809.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3809));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 3809. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3809));