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
14,764,961
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 376 is prime in JavaScript.
function isPrime() { let n = 376; 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 376 is prime in JavaScript. ### Response: function isPrime() { let n = 376; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
53,250,037
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; }
99,507,677
kk
Java
logic_ops
intermediate
Java тилінде 1910 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1910; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1910 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1910; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
39,615,608
en
C++
string_ops
advanced
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
91,833,101
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; }
81,941,379
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
66,088,191
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; }
30,995,321
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; }
1,871,919
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 290318 в Unity?
int buffer = 290318;
### Instruction: Как объявить переменную buffer со значением 290318 в Unity? ### Response: int buffer = 290318;
1,033,533
kk
Java
var_decl
beginner
Java тілінде 777907 мәнімен result айнымалысын қалай жариялауға болады?
int result = 777907;
### Instruction: Java тілінде 777907 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 777907;
2,105,539
en
Java
var_decl
beginner
How to declare a variable limit with value 696846 in Java?
int limit = 696846;
### Instruction: How to declare a variable limit with value 696846 in Java? ### Response: int limit = 696846;
4,485,363
ru
C++
var_decl
beginner
Как объявить переменную x со значением 344352 в C++?
int x = 344352;
### Instruction: Как объявить переменную x со значением 344352 в C++? ### Response: int x = 344352;
12,927,435
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();
1,973,175
kk
C++
var_decl
beginner
C++ тілінде 433502 мәнімен data айнымалысын қалай жариялауға болады?
int data = 433502;
### Instruction: C++ тілінде 433502 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 433502;
46,542,133
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1949 високосным.
public bool IsLeap() { int y = 1949; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1949 високосным. ### Response: public bool IsLeap() { int y = 1949; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
677,348
kk
Java
sum_n
intermediate
Java тілінде 1-ден 1486-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1486));
### Instruction: Java тілінде 1-ден 1486-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1486));
1,895,133
en
JavaScript
var_decl
beginner
How to declare a variable result with value 304703 in JavaScript?
let result = 304703;
### Instruction: How to declare a variable result with value 304703 in JavaScript? ### Response: let result = 304703;
3,476,805
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 839031 в Python?
weight = 839031
### Instruction: Как объявить переменную weight со значением 839031 в Python? ### Response: weight = 839031
2,150,083
kk
C#
var_decl
beginner
C# тілінде 137098 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 137098;
### Instruction: C# тілінде 137098 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 137098;
34,436,854
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 231 простым.
public bool IsPrime() { int n = 231; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 231 простым. ### Response: public bool IsPrime() { int n = 231; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
23,256,886
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; }
11,834,186
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,363,201
ru
JavaScript
var_decl
beginner
Как объявить переменную level со значением 742680 в JavaScript?
let level = 742680;
### Instruction: Как объявить переменную level со значением 742680 в JavaScript? ### Response: let level = 742680;
4,953,958
en
Java
var_decl
beginner
How to declare a variable limit with value 527329 in Java?
int limit = 527329;
### Instruction: How to declare a variable limit with value 527329 in Java? ### Response: int limit = 527329;
58,859,219
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1956 високосным.
public bool IsLeap() { int y = 1956; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1956 високосным. ### Response: public bool IsLeap() { int y = 1956; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
44,178,374
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2012 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2012; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2012 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2012; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
2,963,130
en
C#
var_decl
beginner
How to declare a variable health with value 347915 in C#?
int health = 347915;
### Instruction: How to declare a variable health with value 347915 in C#? ### Response: int health = 347915;
18,884,298
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,482,316
ru
C#
var_decl
beginner
Как объявить переменную size со значением 700798 в C#?
int size = 700798;
### Instruction: Как объявить переменную size со значением 700798 в C#? ### Response: int size = 700798;
93,067,810
en
Python
logic_ops
advanced
Write logic to check if the year 1958 is a leap year in Python.
def is_leap(): year = 1958 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1958 is a leap year in Python. ### Response: def is_leap(): year = 1958 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
14,901,733
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; }
3,695,932
ru
JavaScript
var_decl
beginner
Как объявить переменную x со значением 177078 в JavaScript?
let x = 177078;
### Instruction: Как объявить переменную x со значением 177078 в JavaScript? ### Response: let x = 177078;
3,568,949
ru
C++
var_decl
beginner
Как объявить переменную count со значением 940753 в C++?
int count = 940753;
### Instruction: Как объявить переменную count со значением 940753 в C++? ### Response: int count = 940753;
2,988,465
en
Java
var_decl
beginner
How to declare a variable offset with value 896406 in Java?
int offset = 896406;
### Instruction: How to declare a variable offset with value 896406 in Java? ### Response: int offset = 896406;
3,512,867
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 90363 в Python?
rate = 90363
### Instruction: Как объявить переменную rate со значением 90363 в Python? ### Response: rate = 90363
1,975,867
en
Java
var_decl
beginner
How to declare a variable speed with value 8964 in Java?
int speed = 8964;
### Instruction: How to declare a variable speed with value 8964 in Java? ### Response: int speed = 8964;
88,033,242
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; }
32,230,564
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
47,280,827
en
Java
string_ops
intermediate
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,561,349
ru
C++
var_decl
beginner
Как объявить переменную count со значением 397611 в C++?
int count = 397611;
### Instruction: Как объявить переменную count со значением 397611 в C++? ### Response: int count = 397611;
37,569,895
kk
C#
string_ops
intermediate
C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
2,909,894
kk
Unity
var_decl
beginner
Unity тілінде 446520 мәнімен x айнымалысын қалай жариялауға болады?
int x = 446520;
### Instruction: Unity тілінде 446520 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 446520;
4,634,639
en
Python
var_decl
beginner
How to declare a variable buffer with value 840578 in Python?
buffer = 840578
### Instruction: How to declare a variable buffer with value 840578 in Python? ### Response: buffer = 840578
72,985,958
kk
C#
logic_ops
intermediate
C# тилінде 6 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 6; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 6 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 6; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
64,864,442
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; }
3,099,073
en
C#
var_decl
beginner
How to declare a variable count with value 76308 in C#?
int count = 76308;
### Instruction: How to declare a variable count with value 76308 in C#? ### Response: int count = 76308;
49,793,897
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,310,381
kk
C#
var_decl
beginner
C# тілінде 328346 мәнімен size айнымалысын қалай жариялауға болады?
int size = 328346;
### Instruction: C# тілінде 328346 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 328346;
42,069,689
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
73,091,417
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; }
31,112,372
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); }
56,163,640
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; }
51,844,539
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;
41,789,224
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]
2,806,976
kk
Unity
var_decl
beginner
Unity тілінде 86862 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 86862;
### Instruction: Unity тілінде 86862 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 86862;
66,854,273
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; }
4,495,523
ru
C++
var_decl
beginner
Как объявить переменную y со значением 398847 в C++?
int y = 398847;
### Instruction: Как объявить переменную y со значением 398847 в C++? ### Response: int y = 398847;
4,568,439
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 180255 в Unity?
int timer = 180255;
### Instruction: Как объявить переменную timer со значением 180255 в Unity? ### Response: int timer = 180255;
2,526,880
en
C#
var_decl
beginner
How to declare a variable level with value 257921 in C#?
int level = 257921;
### Instruction: How to declare a variable level with value 257921 in C#? ### Response: int level = 257921;
91,920,094
kk
Java
array_ops
intermediate
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
65,182,889
en
Python
string_ops
intermediate
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
41,969,413
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 479 простым.
function isPrime() { let n = 479; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 479 простым. ### Response: function isPrime() { let n = 479; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,559,901
kk
Java
var_decl
beginner
Java тілінде 152012 мәнімен result айнымалысын қалай жариялауға болады?
int result = 152012;
### Instruction: Java тілінде 152012 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 152012;
47,919,790
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; }
2,889,479
kk
Java
var_decl
beginner
Java тілінде 595673 мәнімен level айнымалысын қалай жариялауға болады?
int level = 595673;
### Instruction: Java тілінде 595673 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 595673;
1,944,987
kk
Unity
var_decl
beginner
Unity тілінде 627808 мәнімен y айнымалысын қалай жариялауға болады?
int y = 627808;
### Instruction: Unity тілінде 627808 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 627808;
91,448,403
en
Unity
string_ops
intermediate
Write a function that checks if a string is a palindrome in 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: Write a function that checks if a string is a palindrome in 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; }
237,462
en
JavaScript
var_decl
beginner
How to declare a variable x with value 779034 in JavaScript?
let x = 779034;
### Instruction: How to declare a variable x with value 779034 in JavaScript? ### Response: let x = 779034;
1,512,554
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 849217 в JavaScript?
let total = 849217;
### Instruction: Как объявить переменную total со значением 849217 в JavaScript? ### Response: let total = 849217;
21,332,418
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)
69,124,925
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2002 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2002; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2002 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2002; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,590,277
en
Unity
var_decl
beginner
How to declare a variable offset with value 775506 in Unity?
int offset = 775506;
### Instruction: How to declare a variable offset with value 775506 in Unity? ### Response: int offset = 775506;
82,572,179
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);
62,683,992
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 161 простым.
public bool IsPrime() { int n = 161; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 161 простым. ### Response: public bool IsPrime() { int n = 161; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
96,630,610
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
52,642,903
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 38 простым.
def is_prime(): n = 38 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 38 простым. ### Response: def is_prime(): n = 38 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
69,217,477
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; }
16,152,595
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
1,869,657
en
C++
var_decl
beginner
How to declare a variable buffer with value 850629 in C++?
int buffer = 850629;
### Instruction: How to declare a variable buffer with value 850629 in C++? ### Response: int buffer = 850629;
611,553
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 4755.
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(4755) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 4755. ### 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(4755) << std::endl;
45,286,076
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,057,061
en
Unity
var_decl
beginner
How to declare a variable result with value 52581 in Unity?
int result = 52581;
### Instruction: How to declare a variable result with value 52581 in Unity? ### Response: int result = 52581;
96,757,121
kk
Java
array_ops
advanced
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
55,018,921
en
C++
logic_ops
intermediate
Write logic to check if the year 2053 is a leap year in C++.
public bool IsLeap() { int y = 2053; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2053 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2053; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,750,071
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 193518 в Python?
buffer = 193518
### Instruction: Как объявить переменную buffer со значением 193518 в Python? ### Response: buffer = 193518
24,597,028
en
Python
string_ops
intermediate
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
16,211,606
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; }
25,146,843
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 419 простым.
public bool IsPrime() { int n = 419; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 419 простым. ### Response: public bool IsPrime() { int n = 419; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
69,821,527
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; }
73,579,183
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; }
28,849,911
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
57,887,488
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(); }
53,702,329
en
Python
string_ops
intermediate
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
387,622
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 1403.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(1403))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 1403. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(1403))
85,241,029
en
Java
array_ops
advanced
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); }
3,479,448
kk
C#
var_decl
beginner
C# тілінде 599161 мәнімен data айнымалысын қалай жариялауға болады?
int data = 599161;
### Instruction: C# тілінде 599161 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 599161;
3,128,096
kk
Unity
var_decl
beginner
Unity тілінде 677700 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 677700;
### Instruction: Unity тілінде 677700 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 677700;
21,318,765
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 383 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 383; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 383 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 383; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
63,421,437
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; }
35,659,818
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); }