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
52,564,992
en
Unity
array_ops
advanced
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); }
75,222,523
en
Python
array_ops
intermediate
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]
75,012,251
en
JavaScript
string_ops
advanced
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
52,863
ru
Python
var_decl
beginner
Как объявить переменную count со значением 856081 в Python?
count = 856081
### Instruction: Как объявить переменную count со значением 856081 в Python? ### Response: count = 856081
1,832,944
kk
Java
var_decl
beginner
Java тілінде 191749 мәнімен y айнымалысын қалай жариялауға болады?
int y = 191749;
### Instruction: Java тілінде 191749 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 191749;
68,869,491
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; }
2,862,960
ru
C#
var_decl
beginner
Как объявить переменную result со значением 463862 в C#?
int result = 463862;
### Instruction: Как объявить переменную result со значением 463862 в C#? ### Response: int result = 463862;
40,681,486
en
Python
logic_ops
intermediate
Write logic to check if the year 2043 is a leap year in Python.
def is_leap(): year = 2043 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2043 is a leap year in Python. ### Response: def is_leap(): year = 2043 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
72,667,154
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(); }
23,375,133
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); }
4,478,638
kk
Java
var_decl
beginner
Java тілінде 843701 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 843701;
### Instruction: Java тілінде 843701 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 843701;
91,383,643
en
C++
logic_ops
intermediate
Write logic to check if the year 1998 is a leap year in C++.
public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1998 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
43,874,278
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;
47,009,989
kk
Python
logic_ops
intermediate
Python тилінде 325 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 325 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 325 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 325 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
20,457,460
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]
1,226,782
kk
Java
var_decl
beginner
Java тілінде 22587 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 22587;
### Instruction: Java тілінде 22587 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 22587;
94,836,079
ru
C#
string_ops
advanced
Напишите на C# функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C# функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
297,930
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 8195.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8195)); }
### Instruction: Write a function in Unity that calculates the factorial of 8195. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8195)); }
2,836,835
kk
C#
var_decl
beginner
C# тілінде 154503 мәнімен count айнымалысын қалай жариялауға болады?
int count = 154503;
### Instruction: C# тілінде 154503 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 154503;
20,013,593
kk
Unity
array_ops
intermediate
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
532,464
kk
Java
var_decl
beginner
Java тілінде 854615 мәнімен x айнымалысын қалай жариялауға болады?
int x = 854615;
### Instruction: Java тілінде 854615 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 854615;
93,592,536
kk
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; }
96,824,585
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,857,149
kk
Unity
var_decl
beginner
Unity тілінде 97450 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 97450;
### Instruction: Unity тілінде 97450 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 97450;
42,597,176
ru
Java
array_ops
advanced
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
21,556,209
kk
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);
1,093,395
kk
Unity
var_decl
beginner
Unity тілінде 58010 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 58010;
### Instruction: Unity тілінде 58010 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 58010;
35,028,464
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
2,637,057
kk
Unity
var_decl
beginner
Unity тілінде 792564 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 792564;
### Instruction: Unity тілінде 792564 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 792564;
44,187,924
kk
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; }
74,654,538
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
766,530
ru
C#
var_decl
beginner
Как объявить переменную result со значением 57684 в C#?
int result = 57684;
### Instruction: Как объявить переменную result со значением 57684 в C#? ### Response: int result = 57684;
3,741,269
en
Unity
var_decl
beginner
How to declare a variable score with value 609030 in Unity?
int score = 609030;
### Instruction: How to declare a variable score with value 609030 in Unity? ### Response: int score = 609030;
97,526,450
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);
68,669,834
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; }
89,807,706
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]
47,749,333
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 418 простым.
def is_prime(): n = 418 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 418 простым. ### Response: def is_prime(): n = 418 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
94,515,495
en
Unity
string_ops
intermediate
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,449,762
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 629984 в Python?
buffer = 629984
### Instruction: Как объявить переменную buffer со значением 629984 в Python? ### Response: buffer = 629984
75,140,396
kk
Unity
array_ops
intermediate
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
81,297,047
ru
C#
array_ops
advanced
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
894,378
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 5739.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5739));
### Instruction: Write a function in JavaScript that calculates the factorial of 5739. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5739));
3,382,222
ru
JavaScript
var_decl
beginner
Как объявить переменную rate со значением 16371 в JavaScript?
let rate = 16371;
### Instruction: Как объявить переменную rate со значением 16371 в JavaScript? ### Response: let rate = 16371;
1,604,543
ru
Python
var_decl
beginner
Как объявить переменную timer со значением 657602 в Python?
timer = 657602
### Instruction: Как объявить переменную timer со значением 657602 в Python? ### Response: timer = 657602
2,357,413
en
JavaScript
var_decl
beginner
How to declare a variable result with value 399884 in JavaScript?
let result = 399884;
### Instruction: How to declare a variable result with value 399884 in JavaScript? ### Response: let result = 399884;
81,801,916
ru
Java
string_ops
advanced
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,647,720
en
Python
var_decl
beginner
How to declare a variable score with value 177327 in Python?
score = 177327
### Instruction: How to declare a variable score with value 177327 in Python? ### Response: score = 177327
465,638
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 956904 в Unity?
int buffer = 956904;
### Instruction: Как объявить переменную buffer со значением 956904 в Unity? ### Response: int buffer = 956904;
3,081,680
kk
JavaScript
var_decl
beginner
JavaScript тілінде 312253 мәнімен rate айнымалысын қалай жариялауға болады?
let rate = 312253;
### Instruction: JavaScript тілінде 312253 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: let rate = 312253;
17,924,907
en
Java
logic_ops
advanced
Write a function that determines if the number 316 is prime in Java.
public bool IsPrime() { int n = 316; 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 316 is prime in Java. ### Response: public bool IsPrime() { int n = 316; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,657,443
en
Unity
var_decl
beginner
How to declare a variable timer with value 684830 in Unity?
int timer = 684830;
### Instruction: How to declare a variable timer with value 684830 in Unity? ### Response: int timer = 684830;
3,444,938
ru
JavaScript
var_decl
beginner
Как объявить переменную limit со значением 121091 в JavaScript?
let limit = 121091;
### Instruction: Как объявить переменную limit со значением 121091 в JavaScript? ### Response: let limit = 121091;
40,114,505
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; }
30,955,081
ru
Java
string_ops
advanced
Напишите на 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; }
92,685,502
ru
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); }
3,373,241
en
C#
var_decl
beginner
How to declare a variable data with value 307689 in C#?
int data = 307689;
### Instruction: How to declare a variable data with value 307689 in C#? ### Response: int data = 307689;
662,559
kk
JavaScript
var_decl
beginner
JavaScript тілінде 7590 мәнімен index айнымалысын қалай жариялауға болады?
let index = 7590;
### Instruction: JavaScript тілінде 7590 мәнімен index айнымалысын қалай жариялауға болады? ### Response: let index = 7590;
977,355
ru
C++
var_decl
beginner
Как объявить переменную weight со значением 306055 в C++?
int weight = 306055;
### Instruction: Как объявить переменную weight со значением 306055 в C++? ### Response: int weight = 306055;
40,455,682
en
JavaScript
string_ops
advanced
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
156,477
kk
Java
factorial
advanced
Java тілінде 3967 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3967));
### Instruction: Java тілінде 3967 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3967));
32,085,857
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 442 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 442; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 442 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 442; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,406,554
ru
C++
var_decl
beginner
Как объявить переменную count со значением 430898 в C++?
int count = 430898;
### Instruction: Как объявить переменную count со значением 430898 в C++? ### Response: int count = 430898;
91,858,462
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 2022 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2022; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2022 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2022; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
60,817
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 5356.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5356))
### Instruction: Write a function in Python that sums numbers from 1 to 5356. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5356))
2,944,849
kk
Python
var_decl
beginner
Python тілінде 188752 мәнімен health айнымалысын қалай жариялауға болады?
health = 188752
### Instruction: Python тілінде 188752 мәнімен health айнымалысын қалай жариялауға болады? ### Response: health = 188752
722,640
kk
JavaScript
var_decl
beginner
JavaScript тілінде 774828 мәнімен limit айнымалысын қалай жариялауға болады?
let limit = 774828;
### Instruction: JavaScript тілінде 774828 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: let limit = 774828;
695,783
ru
C++
var_decl
beginner
Как объявить переменную x со значением 801303 в C++?
int x = 801303;
### Instruction: Как объявить переменную x со значением 801303 в C++? ### Response: int x = 801303;
2,909,329
ru
Python
var_decl
beginner
Как объявить переменную level со значением 860360 в Python?
level = 860360
### Instruction: Как объявить переменную level со значением 860360 в Python? ### Response: level = 860360
55,209,597
kk
Java
logic_ops
advanced
Java тилінде 94 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 94; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 94 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 94; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
41,860,808
kk
C#
logic_ops
intermediate
C# тилінде 1964 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1964; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1964 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1964; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,222,699
kk
Java
var_decl
beginner
Java тілінде 896880 мәнімен y айнымалысын қалай жариялауға болады?
int y = 896880;
### Instruction: Java тілінде 896880 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 896880;
66,774,022
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; }
24,612,352
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
55,336,078
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);
77,680,732
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
41,921,277
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
1,929,491
ru
C#
var_decl
beginner
Как объявить переменную value со значением 226905 в C#?
int value = 226905;
### Instruction: Как объявить переменную value со значением 226905 в C#? ### Response: int value = 226905;
14,236,767
en
Python
logic_ops
advanced
Write logic to check if the year 2005 is a leap year in Python.
def is_leap(): year = 2005 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2005 is a leap year in Python. ### Response: def is_leap(): year = 2005 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,179,400
ru
JavaScript
var_decl
beginner
Как объявить переменную result со значением 374888 в JavaScript?
let result = 374888;
### Instruction: Как объявить переменную result со значением 374888 в JavaScript? ### Response: let result = 374888;
3,375,437
kk
C++
var_decl
beginner
C++ тілінде 764305 мәнімен health айнымалысын қалай жариялауға болады?
int health = 764305;
### Instruction: C++ тілінде 764305 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 764305;
26,901,372
kk
C#
logic_ops
intermediate
C# тилінде 1927 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1927; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1927 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1927; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,538,204
en
C++
var_decl
beginner
How to declare a variable weight with value 599056 in C++?
int weight = 599056;
### Instruction: How to declare a variable weight with value 599056 in C++? ### Response: int weight = 599056;
3,556,885
kk
JavaScript
var_decl
beginner
JavaScript тілінде 186787 мәнімен health айнымалысын қалай жариялауға болады?
let health = 186787;
### Instruction: JavaScript тілінде 186787 мәнімен health айнымалысын қалай жариялауға болады? ### Response: let health = 186787;
66,261,413
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('');
1,843,140
en
C++
var_decl
beginner
How to declare a variable limit with value 166752 in C++?
int limit = 166752;
### Instruction: How to declare a variable limit with value 166752 in C++? ### Response: int limit = 166752;
97,429,329
en
C++
array_ops
advanced
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); }
1,586,545
kk
Unity
var_decl
beginner
Unity тілінде 889345 мәнімен count айнымалысын қалай жариялауға болады?
int count = 889345;
### Instruction: Unity тілінде 889345 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 889345;
30,291,742
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
135,891
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 6768.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(6768));
### Instruction: Write a function in C# that calculates the factorial of 6768. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(6768));
89,485,071
en
Unity
logic_ops
intermediate
Write a function that determines if the number 204 is prime in Unity.
public bool IsPrime() { int n = 204; 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 204 is prime in Unity. ### Response: public bool IsPrime() { int n = 204; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
23,956,063
en
C++
array_ops
advanced
Write a function that finds the maximum number in an array in C++.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C++. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
52,115,354
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 111 простым.
function isPrime() { let n = 111; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 111 простым. ### Response: function isPrime() { let n = 111; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
84,196,724
kk
C++
array_ops
intermediate
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
410,806
kk
Java
sum_n
intermediate
Java тілінде 1-ден 363-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(363));
### Instruction: Java тілінде 1-ден 363-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(363));
49,306,867
en
C++
logic_ops
intermediate
Write a function that determines if the number 407 is prime in C++.
public bool IsPrime() { int n = 407; 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 407 is prime in C++. ### Response: public bool IsPrime() { int n = 407; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,831,866
kk
JavaScript
var_decl
beginner
JavaScript тілінде 907017 мәнімен score айнымалысын қалай жариялауға болады?
let score = 907017;
### Instruction: JavaScript тілінде 907017 мәнімен score айнымалысын қалай жариялауға болады? ### Response: let score = 907017;
35,912,501
en
Python
logic_ops
intermediate
Write logic to check if the year 2081 is a leap year in Python.
def is_leap(): year = 2081 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2081 is a leap year in Python. ### Response: def is_leap(): year = 2081 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
128,116
ru
JavaScript
var_decl
beginner
Как объявить переменную rate со значением 725550 в JavaScript?
let rate = 725550;
### Instruction: Как объявить переменную rate со значением 725550 в JavaScript? ### Response: let rate = 725550;
136,694
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 1002-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(1002) << std::endl;
### Instruction: C++ тілінде 1-ден 1002-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(1002) << std::endl;
77,404
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 370.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(370));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 370. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(370));