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
2,606,385
kk
Unity
var_decl
beginner
Unity тілінде 778304 мәнімен x айнымалысын қалай жариялауға болады?
int x = 778304;
### Instruction: Unity тілінде 778304 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 778304;
3,607,916
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 624262 в Unity?
int timer = 624262;
### Instruction: Как объявить переменную timer со значением 624262 в Unity? ### Response: int timer = 624262;
36,162,320
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]
323,780
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 9217.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9217) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 9217. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9217) << std::endl;
2,311,751
en
JavaScript
var_decl
beginner
How to declare a variable value with value 513597 in JavaScript?
let value = 513597;
### Instruction: How to declare a variable value with value 513597 in JavaScript? ### Response: let value = 513597;
2,488,811
en
Java
var_decl
beginner
How to declare a variable score with value 612626 in Java?
int score = 612626;
### Instruction: How to declare a variable score with value 612626 in Java? ### Response: int score = 612626;
147,589
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 6520.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6520));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 6520. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6520));
64,944,804
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('');
2,699,840
kk
Unity
var_decl
beginner
Unity тілінде 54213 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 54213;
### Instruction: Unity тілінде 54213 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 54213;
78,348,741
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 18 простым.
public bool IsPrime() { int n = 18; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 18 простым. ### Response: public bool IsPrime() { int n = 18; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,734,944
ru
C#
var_decl
beginner
Как объявить переменную count со значением 717226 в C#?
int count = 717226;
### Instruction: Как объявить переменную count со значением 717226 в C#? ### Response: int count = 717226;
3,699,898
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 376560 в C#?
int buffer = 376560;
### Instruction: Как объявить переменную buffer со значением 376560 в C#? ### Response: int buffer = 376560;
93,845,350
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; }
495,852
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 9132.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9132)); }
### Instruction: Write a function in Unity that calculates the factorial of 9132. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9132)); }
280,280
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 1713.
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(1713) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 1713. ### 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(1713) << std::endl;
502,499
kk
Unity
var_decl
beginner
Unity тілінде 941661 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 941661;
### Instruction: Unity тілінде 941661 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 941661;
61,175,188
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]
81,162,932
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
38,189,828
en
C#
string_ops
advanced
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; }
61,750,742
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
14,133,540
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); }
4,329,582
ru
Python
var_decl
beginner
Как объявить переменную data со значением 687985 в Python?
data = 687985
### Instruction: Как объявить переменную data со значением 687985 в Python? ### Response: data = 687985
4,932,571
en
C#
var_decl
beginner
How to declare a variable y with value 823689 in C#?
int y = 823689;
### Instruction: How to declare a variable y with value 823689 in C#? ### Response: int y = 823689;
3,993,110
en
JavaScript
var_decl
beginner
How to declare a variable amount with value 796141 in JavaScript?
let amount = 796141;
### Instruction: How to declare a variable amount with value 796141 in JavaScript? ### Response: let amount = 796141;
93,479,854
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; }
3,475,937
kk
Java
var_decl
beginner
Java тілінде 632747 мәнімен data айнымалысын қалай жариялауға болады?
int data = 632747;
### Instruction: Java тілінде 632747 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 632747;
3,897,458
en
C++
var_decl
beginner
How to declare a variable score with value 451136 in C++?
int score = 451136;
### Instruction: How to declare a variable score with value 451136 in C++? ### Response: int score = 451136;
58,327,909
en
JavaScript
logic_ops
advanced
Write logic to check if the year 2033 is a leap year in JavaScript.
function isLeap() { let y = 2033; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2033 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2033; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
32,002,134
kk
Unity
string_ops
advanced
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
968,096
ru
C++
var_decl
beginner
Как объявить переменную health со значением 666987 в C++?
int health = 666987;
### Instruction: Как объявить переменную health со значением 666987 в C++? ### Response: int health = 666987;
23,117,159
kk
Python
string_ops
advanced
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аеёиоуыэюя')
92,711,722
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
64,801,742
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); }
72,587,820
en
C#
string_ops
intermediate
Write a function that converts a string to uppercase in C#.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C#. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
57,781
kk
C#
sum_n
intermediate
C# тілінде 1-ден 8172-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8172));
### Instruction: C# тілінде 1-ден 8172-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8172));
25,198,682
kk
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; }
230,180
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 6821.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(6821));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 6821. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(6821));
73,352,695
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('');
28,636,282
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); }
71,004,290
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; }
64,239,334
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 363 простым.
public bool IsPrime() { int n = 363; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 363 простым. ### Response: public bool IsPrime() { int n = 363; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,063,250
ru
Unity
var_decl
beginner
Как объявить переменную health со значением 61982 в Unity?
int health = 61982;
### Instruction: Как объявить переменную health со значением 61982 в Unity? ### Response: int health = 61982;
90,075,379
kk
C#
logic_ops
advanced
C# тилінде 33 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 33; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 33 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 33; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
684,345
ru
C++
var_decl
beginner
Как объявить переменную x со значением 349511 в C++?
int x = 349511;
### Instruction: Как объявить переменную x со значением 349511 в C++? ### Response: int x = 349511;
27,852,334
ru
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; }
31,599,949
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; }
27,405,698
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1958 високосным.
function isLeap() { let y = 1958; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1958 високосным. ### Response: function isLeap() { let y = 1958; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
64,295,636
kk
C#
logic_ops
advanced
C# тилінде 1958 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1958; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1958 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1958; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,008,706
ru
C++
var_decl
beginner
Как объявить переменную y со значением 217886 в C++?
int y = 217886;
### Instruction: Как объявить переменную y со значением 217886 в C++? ### Response: int y = 217886;
2,702,281
kk
Java
var_decl
beginner
Java тілінде 360158 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 360158;
### Instruction: Java тілінде 360158 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 360158;
36,848,262
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; }
85,316,375
en
C++
logic_ops
intermediate
Write logic to check if the year 1967 is a leap year in C++.
public bool IsLeap() { int y = 1967; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1967 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1967; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,564,636
ru
C++
var_decl
beginner
Как объявить переменную index со значением 96556 в C++?
int index = 96556;
### Instruction: Как объявить переменную index со значением 96556 в C++? ### Response: int index = 96556;
2,896,597
en
C#
var_decl
beginner
How to declare a variable total with value 456337 in C#?
int total = 456337;
### Instruction: How to declare a variable total with value 456337 in C#? ### Response: int total = 456337;
4,665,748
en
C++
var_decl
beginner
How to declare a variable index with value 581977 in C++?
int index = 581977;
### Instruction: How to declare a variable index with value 581977 in C++? ### Response: int index = 581977;
152,001
kk
C++
factorial
advanced
C++ тілінде 8139 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8139) << std::endl;
### Instruction: C++ тілінде 8139 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8139) << std::endl;
460,470
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 246.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(246));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 246. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(246));
90,450,653
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 313 простым.
def is_prime(): n = 313 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 313 простым. ### Response: def is_prime(): n = 313 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
4,877,411
kk
C++
var_decl
beginner
C++ тілінде 155333 мәнімен y айнымалысын қалай жариялауға болады?
int y = 155333;
### Instruction: C++ тілінде 155333 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 155333;
4,183,150
kk
C#
var_decl
beginner
C# тілінде 334355 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 334355;
### Instruction: C# тілінде 334355 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 334355;
25,715,096
kk
Java
logic_ops
intermediate
Java тилінде 290 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 290; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 290 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 290; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,095,717
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 416352 в Python?
buffer = 416352
### Instruction: Как объявить переменную buffer со значением 416352 в Python? ### Response: buffer = 416352
91,344,378
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; }
69,478,680
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(); }
4,713,980
ru
Python
var_decl
beginner
Как объявить переменную index со значением 99581 в Python?
index = 99581
### Instruction: Как объявить переменную index со значением 99581 в Python? ### Response: index = 99581
43,333,984
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1977 високосным.
function isLeap() { let y = 1977; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1977 високосным. ### Response: function isLeap() { let y = 1977; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
52,560,164
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
440,027
kk
C#
var_decl
beginner
C# тілінде 748242 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 748242;
### Instruction: C# тілінде 748242 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 748242;
24,299,975
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('');
369,226
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 7406.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7406));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 7406. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7406));
514,831
en
Java
var_decl
beginner
How to declare a variable speed with value 525062 in Java?
int speed = 525062;
### Instruction: How to declare a variable speed with value 525062 in Java? ### Response: int speed = 525062;
25,772
kk
Python
factorial
advanced
Python тілінде 457 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(457))
### Instruction: Python тілінде 457 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(457))
2,350,778
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 898187 в Unity?
int speed = 898187;
### Instruction: Как объявить переменную speed со значением 898187 в Unity? ### Response: int speed = 898187;
1,948,490
en
Python
var_decl
beginner
How to declare a variable data with value 166883 in Python?
data = 166883
### Instruction: How to declare a variable data with value 166883 in Python? ### Response: data = 166883
66,281,716
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
87,137,151
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 16 is prime in JavaScript.
function isPrime() { let n = 16; 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 16 is prime in JavaScript. ### Response: function isPrime() { let n = 16; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
188,851
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 6555.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6555) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 6555. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6555) << std::endl;
4,549,453
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 144700 в C#?
int buffer = 144700;
### Instruction: Как объявить переменную buffer со значением 144700 в C#? ### Response: int buffer = 144700;
3,325,157
en
JavaScript
var_decl
beginner
How to declare a variable total with value 24694 in JavaScript?
let total = 24694;
### Instruction: How to declare a variable total with value 24694 in JavaScript? ### Response: let total = 24694;
90,336,749
kk
C#
logic_ops
advanced
C# тилінде 2014 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2014; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2014 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2014; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
94,505,602
en
JavaScript
array_ops
advanced
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();
36,809,578
en
C++
string_ops
intermediate
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
23,983,599
kk
C#
array_ops
intermediate
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,706,081
ru
Python
var_decl
beginner
Как объявить переменную y со значением 542949 в Python?
y = 542949
### Instruction: Как объявить переменную y со значением 542949 в Python? ### Response: y = 542949
34,021,490
en
Python
array_ops
advanced
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
407,592
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 918-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(918));
### Instruction: JavaScript тілінде 1-ден 918-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(918));
65,226,910
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); }
76,748,526
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,087,138
ru
Python
var_decl
beginner
Как объявить переменную offset со значением 524553 в Python?
offset = 524553
### Instruction: Как объявить переменную offset со значением 524553 в Python? ### Response: offset = 524553
53,135,963
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
3,654,181
kk
C#
var_decl
beginner
C# тілінде 677559 мәнімен size айнымалысын қалай жариялауға болады?
int size = 677559;
### Instruction: C# тілінде 677559 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 677559;
70,944,157
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
22,745,559
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; }
36,293,465
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('');
58,108,090
kk
Unity
logic_ops
intermediate
Unity тилінде 35 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 35; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 35 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 35; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
90,005,250
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; }
12,741,283
en
Java
logic_ops
intermediate
Write a function that determines if the number 36 is prime in Java.
public bool IsPrime() { int n = 36; 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 36 is prime in Java. ### Response: public bool IsPrime() { int n = 36; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
34,040,543
en
Python
logic_ops
advanced
Write logic to check if the year 1916 is a leap year in Python.
def is_leap(): year = 1916 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1916 is a leap year in Python. ### Response: def is_leap(): year = 1916 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
41,195,080
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
4,984,022
en
C++
var_decl
beginner
How to declare a variable speed with value 537115 in C++?
int speed = 537115;
### Instruction: How to declare a variable speed with value 537115 in C++? ### Response: int speed = 537115;