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,544,220
en
Unity
var_decl
beginner
How to declare a variable x with value 442941 in Unity?
int x = 442941;
### Instruction: How to declare a variable x with value 442941 in Unity? ### Response: int x = 442941;
87,272,340
en
C#
logic_ops
advanced
Write logic to check if the year 1956 is a leap year in C#.
public bool IsLeap() { int y = 1956; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1956 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1956; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
34,162
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 5671.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5671))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 5671. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5671))
91,166,697
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C++ функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
186,605
kk
JavaScript
factorial
advanced
JavaScript тілінде 7865 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7865));
### Instruction: JavaScript тілінде 7865 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7865));
3,093,157
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 552963 в Java?
int rate = 552963;
### Instruction: Как объявить переменную rate со значением 552963 в Java? ### Response: int rate = 552963;
1,667,379
en
Python
var_decl
beginner
How to declare a variable health with value 507718 in Python?
health = 507718
### Instruction: How to declare a variable health with value 507718 in Python? ### Response: health = 507718
3,927,273
kk
Java
var_decl
beginner
Java тілінде 146613 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 146613;
### Instruction: Java тілінде 146613 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 146613;
3,878,696
kk
Java
var_decl
beginner
Java тілінде 157145 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 157145;
### Instruction: Java тілінде 157145 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 157145;
501,734
ru
Java
var_decl
beginner
Как объявить переменную count со значением 168092 в Java?
int count = 168092;
### Instruction: Как объявить переменную count со значением 168092 в Java? ### Response: int count = 168092;
57,493,282
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();
821,658
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 9977.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9977) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 9977. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9977) << std::endl;
84,591,520
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1998 високосным.
public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1998 високосным. ### Response: public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
38,695,975
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
386,602
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 2758.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2758))
### Instruction: Write a function in Python that calculates the factorial of 2758. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2758))
2,002,372
en
C++
var_decl
beginner
How to declare a variable data with value 437379 in C++?
int data = 437379;
### Instruction: How to declare a variable data with value 437379 in C++? ### Response: int data = 437379;
78,846,821
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1997 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1997; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1997 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1997; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
62,930,099
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; }
1,047,559
kk
Java
var_decl
beginner
Java тілінде 574078 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 574078;
### Instruction: Java тілінде 574078 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 574078;
99,944,484
en
Python
logic_ops
advanced
Write a function that determines if the number 495 is prime in Python.
def is_prime(): n = 495 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Write a function that determines if the number 495 is prime in Python. ### Response: def is_prime(): n = 495 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
4,721,603
en
Unity
var_decl
beginner
How to declare a variable offset with value 353451 in Unity?
int offset = 353451;
### Instruction: How to declare a variable offset with value 353451 in Unity? ### Response: int offset = 353451;
1,905,169
kk
Java
var_decl
beginner
Java тілінде 725731 мәнімен x айнымалысын қалай жариялауға болады?
int x = 725731;
### Instruction: Java тілінде 725731 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 725731;
1,176,962
en
C++
var_decl
beginner
How to declare a variable health with value 314873 in C++?
int health = 314873;
### Instruction: How to declare a variable health with value 314873 in C++? ### Response: int health = 314873;
45,466,816
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; }
18,494,591
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; }
12,983,739
ru
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,868,412
ru
C#
var_decl
beginner
Как объявить переменную index со значением 51032 в C#?
int index = 51032;
### Instruction: Как объявить переменную index со значением 51032 в C#? ### Response: int index = 51032;
14,711,732
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); }
211,686
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 3099.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3099));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 3099. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3099));
71,289,742
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
83,335,555
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
3,443,486
en
Python
var_decl
beginner
How to declare a variable value with value 656746 in Python?
value = 656746
### Instruction: How to declare a variable value with value 656746 in Python? ### Response: value = 656746
1,613,137
ru
Unity
var_decl
beginner
Как объявить переменную amount со значением 494918 в Unity?
int amount = 494918;
### Instruction: Как объявить переменную amount со значением 494918 в Unity? ### Response: int amount = 494918;
80,409,202
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; }
39,818,364
en
C#
logic_ops
intermediate
Write a function that determines if the number 458 is prime in C#.
public bool IsPrime() { int n = 458; 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 458 is prime in C#. ### Response: public bool IsPrime() { int n = 458; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
22,870,473
en
C#
logic_ops
intermediate
Write a function that determines if the number 408 is prime in C#.
public bool IsPrime() { int n = 408; 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 408 is prime in C#. ### Response: public bool IsPrime() { int n = 408; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,048,848
kk
Java
factorial
advanced
Java тілінде 3214 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3214));
### Instruction: Java тілінде 3214 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3214));
847,276
kk
JavaScript
var_decl
beginner
JavaScript тілінде 537949 мәнімен value айнымалысын қалай жариялауға болады?
let value = 537949;
### Instruction: JavaScript тілінде 537949 мәнімен value айнымалысын қалай жариялауға болады? ### Response: let value = 537949;
79,609,537
kk
Unity
logic_ops
intermediate
Unity тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2018; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2018; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
52,174,402
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 192 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 192; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 192 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 192; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,013,252
en
C#
var_decl
beginner
How to declare a variable size with value 791701 in C#?
int size = 791701;
### Instruction: How to declare a variable size with value 791701 in C#? ### Response: int size = 791701;
99,435,671
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
99,197,828
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);
3,979,401
en
Unity
var_decl
beginner
How to declare a variable offset with value 449386 in Unity?
int offset = 449386;
### Instruction: How to declare a variable offset with value 449386 in Unity? ### Response: int offset = 449386;
194,871
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 617.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(617));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 617. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(617));
27,323,198
en
Unity
array_ops
advanced
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
26,995,093
en
C++
string_ops
intermediate
Write a function that checks if a string is a palindrome in C++.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C++. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
75,361,301
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('');
58,998,151
en
Java
array_ops
intermediate
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
81,321,756
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1907 високосным.
public bool IsLeap() { int y = 1907; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1907 високосным. ### Response: public bool IsLeap() { int y = 1907; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
49,576,040
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
855,312
en
Python
var_decl
beginner
How to declare a variable amount with value 328820 in Python?
amount = 328820
### Instruction: How to declare a variable amount with value 328820 in Python? ### Response: amount = 328820
3,831,389
en
JavaScript
var_decl
beginner
How to declare a variable value with value 269970 in JavaScript?
let value = 269970;
### Instruction: How to declare a variable value with value 269970 in JavaScript? ### Response: let value = 269970;
1,764,976
en
C#
var_decl
beginner
How to declare a variable health with value 834309 in C#?
int health = 834309;
### Instruction: How to declare a variable health with value 834309 in C#? ### Response: int health = 834309;
4,098,979
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 766690 в Python?
buffer = 766690
### Instruction: Как объявить переменную buffer со значением 766690 в Python? ### Response: buffer = 766690
175,021
ru
C++
var_decl
beginner
Как объявить переменную amount со значением 227589 в C++?
int amount = 227589;
### Instruction: Как объявить переменную amount со значением 227589 в C++? ### Response: int amount = 227589;
78,600,815
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
60,391,412
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
20,555,365
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
41,176,361
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1919 високосным.
public bool IsLeap() { int y = 1919; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1919 високосным. ### Response: public bool IsLeap() { int y = 1919; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,826,781
ru
C#
var_decl
beginner
Как объявить переменную data со значением 202504 в C#?
int data = 202504;
### Instruction: Как объявить переменную data со значением 202504 в C#? ### Response: int data = 202504;
57,048,255
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; }
1,682,234
ru
C#
var_decl
beginner
Как объявить переменную count со значением 339382 в C#?
int count = 339382;
### Instruction: Как объявить переменную count со значением 339382 в C#? ### Response: int count = 339382;
82,151,930
en
C++
logic_ops
intermediate
Write logic to check if the year 2069 is a leap year in C++.
public bool IsLeap() { int y = 2069; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2069 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2069; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,348,314
en
Python
var_decl
beginner
How to declare a variable y with value 618867 in Python?
y = 618867
### Instruction: How to declare a variable y with value 618867 in Python? ### Response: y = 618867
208,487
kk
Unity
factorial
advanced
Unity тілінде 4626 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4626)); }
### Instruction: Unity тілінде 4626 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4626)); }
658,117
en
JavaScript
var_decl
beginner
How to declare a variable index with value 513148 in JavaScript?
let index = 513148;
### Instruction: How to declare a variable index with value 513148 in JavaScript? ### Response: let index = 513148;
66,033,916
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
3,565,134
kk
C#
var_decl
beginner
C# тілінде 553746 мәнімен health айнымалысын қалай жариялауға болады?
int health = 553746;
### Instruction: C# тілінде 553746 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 553746;
82,714,442
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; }
88,226,717
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; }
73,545,026
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); }
26,801,658
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); }
82,354,470
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
159,872
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 3462-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3462));
### Instruction: JavaScript тілінде 1-ден 3462-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3462));
1,894,017
en
Python
var_decl
beginner
How to declare a variable result with value 730089 in Python?
result = 730089
### Instruction: How to declare a variable result with value 730089 in Python? ### Response: result = 730089
38,412,156
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
925,831
ru
Unity
var_decl
beginner
Как объявить переменную value со значением 60783 в Unity?
int value = 60783;
### Instruction: Как объявить переменную value со значением 60783 в Unity? ### Response: int value = 60783;
137,438
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 2010.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2010));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 2010. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2010));
707,736
kk
Unity
var_decl
beginner
Unity тілінде 647537 мәнімен count айнымалысын қалай жариялауға болады?
int count = 647537;
### Instruction: Unity тілінде 647537 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 647537;
2,944,414
ru
C#
var_decl
beginner
Как объявить переменную limit со значением 328346 в C#?
int limit = 328346;
### Instruction: Как объявить переменную limit со значением 328346 в C#? ### Response: int limit = 328346;
22,244,069
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)
927,733
ru
C++
var_decl
beginner
Как объявить переменную health со значением 204297 в C++?
int health = 204297;
### Instruction: Как объявить переменную health со значением 204297 в C++? ### Response: int health = 204297;
199,225
kk
C#
factorial
advanced
C# тілінде 7706 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7706));
### Instruction: C# тілінде 7706 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7706));
171,245
en
Python
var_decl
beginner
How to declare a variable x with value 446716 in Python?
x = 446716
### Instruction: How to declare a variable x with value 446716 in Python? ### Response: x = 446716
81,788,684
kk
Unity
logic_ops
intermediate
Unity тилінде 1978 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1978; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1978 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1978; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,974,745
ru
C#
var_decl
beginner
Как объявить переменную size со значением 514214 в C#?
int size = 514214;
### Instruction: Как объявить переменную size со значением 514214 в C#? ### Response: int size = 514214;
33,593,280
ru
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; }
15,289,071
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 3 простым.
public bool IsPrime() { int n = 3; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 3 простым. ### Response: public bool IsPrime() { int n = 3; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,109,340
kk
Python
var_decl
beginner
Python тілінде 963182 мәнімен level айнымалысын қалай жариялауға болады?
level = 963182
### Instruction: Python тілінде 963182 мәнімен level айнымалысын қалай жариялауға болады? ### Response: level = 963182
40,890,585
en
JavaScript
string_ops
intermediate
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
3,598,443
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 749133 в Python?
weight = 749133
### Instruction: Как объявить переменную weight со значением 749133 в Python? ### Response: weight = 749133
93,701,303
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1950 високосным.
public bool IsLeap() { int y = 1950; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1950 високосным. ### Response: public bool IsLeap() { int y = 1950; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
773,955
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 582-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(582)); }
### Instruction: Unity тілінде 1-ден 582-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(582)); }
41,119,091
en
Python
array_ops
intermediate
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)
968,931
en
Python
var_decl
beginner
How to declare a variable level with value 527597 in Python?
level = 527597
### Instruction: How to declare a variable level with value 527597 in Python? ### Response: level = 527597
44,683,754
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; }
23,475,596
kk
C++
logic_ops
advanced
C++ тилінде 1957 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1957; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1957 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1957; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
53,356,834
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C++ функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
63,869,147
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; }