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
1,761,228
en
Java
var_decl
beginner
How to declare a variable speed with value 738360 in Java?
int speed = 738360;
### Instruction: How to declare a variable speed with value 738360 in Java? ### Response: int speed = 738360;
4,899,309
ru
Java
var_decl
beginner
Как объявить переменную score со значением 848437 в Java?
int score = 848437;
### Instruction: Как объявить переменную score со значением 848437 в Java? ### Response: int score = 848437;
3,768,028
en
JavaScript
var_decl
beginner
How to declare a variable total with value 245631 in JavaScript?
let total = 245631;
### Instruction: How to declare a variable total with value 245631 in JavaScript? ### Response: let total = 245631;
27,001,484
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; }
52,276,650
en
Java
logic_ops
advanced
Write logic to check if the year 2043 is a leap year in Java.
public bool IsLeap() { int y = 2043; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2043 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2043; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
90,343,117
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; }
58,536,622
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 1964 високосным.
public bool IsLeap() { int y = 1964; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1964 високосным. ### Response: public bool IsLeap() { int y = 1964; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
28,274,760
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);
65,555,075
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(); }
4,725,013
kk
JavaScript
var_decl
beginner
JavaScript тілінде 424478 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 424478;
### Instruction: JavaScript тілінде 424478 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 424478;
78,072,368
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 175 простым.
function isPrime() { let n = 175; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 175 простым. ### Response: function isPrime() { let n = 175; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
18,150,058
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
17,686,440
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)
1,603,519
kk
C++
var_decl
beginner
C++ тілінде 267998 мәнімен health айнымалысын қалай жариялауға болады?
int health = 267998;
### Instruction: C++ тілінде 267998 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 267998;
2,227,066
kk
C#
var_decl
beginner
C# тілінде 236044 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 236044;
### Instruction: C# тілінде 236044 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 236044;
98,791,990
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();
177,569
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 2958.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2958));
### Instruction: Write a function in C# that calculates the factorial of 2958. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2958));
39,179,106
kk
Unity
logic_ops
advanced
Unity тилінде 1986 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1986; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1986 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1986; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,175,940
en
JavaScript
var_decl
beginner
How to declare a variable total with value 282452 in JavaScript?
let total = 282452;
### Instruction: How to declare a variable total with value 282452 in JavaScript? ### Response: let total = 282452;
44,252,680
kk
Unity
logic_ops
intermediate
Unity тилінде 2090 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2090; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2090 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2090; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
81,658,963
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 98 простым.
def is_prime(): n = 98 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 98 простым. ### Response: def is_prime(): n = 98 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
69,601,659
en
C#
array_ops
intermediate
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; }
29,230,432
en
Java
logic_ops
intermediate
Write a function that determines if the number 19 is prime in Java.
public bool IsPrime() { int n = 19; 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 19 is prime in Java. ### Response: public bool IsPrime() { int n = 19; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
352,994
ru
C++
var_decl
beginner
Как объявить переменную level со значением 531959 в C++?
int level = 531959;
### Instruction: Как объявить переменную level со значением 531959 в C++? ### Response: int level = 531959;
29,231,250
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; }
42,980,037
kk
Java
logic_ops
intermediate
Java тилінде 2074 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2074; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2074 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2074; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,144,457
ru
JavaScript
var_decl
beginner
Как объявить переменную limit со значением 379118 в JavaScript?
let limit = 379118;
### Instruction: Как объявить переменную limit со значением 379118 в JavaScript? ### Response: let limit = 379118;
3,634,303
en
JavaScript
var_decl
beginner
How to declare a variable score with value 4077 in JavaScript?
let score = 4077;
### Instruction: How to declare a variable score with value 4077 in JavaScript? ### Response: let score = 4077;
37,011,688
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 303 простым.
function isPrime() { let n = 303; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 303 простым. ### Response: function isPrime() { let n = 303; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,120,666
en
C++
var_decl
beginner
How to declare a variable buffer with value 925873 in C++?
int buffer = 925873;
### Instruction: How to declare a variable buffer with value 925873 in C++? ### Response: int buffer = 925873;
97,725,276
kk
Python
array_ops
intermediate
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
467,982
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 1738.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1738))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 1738. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1738))
21,860,720
en
C++
array_ops
advanced
Write a function that filters only even numbers from a list in C++.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C++. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,772,553
ru
C#
var_decl
beginner
Как объявить переменную value со значением 553099 в C#?
int value = 553099;
### Instruction: Как объявить переменную value со значением 553099 в C#? ### Response: int value = 553099;
4,080,886
ru
Unity
var_decl
beginner
Как объявить переменную size со значением 884981 в Unity?
int size = 884981;
### Instruction: Как объявить переменную size со значением 884981 в Unity? ### Response: int size = 884981;
2,702,905
ru
Java
var_decl
beginner
Как объявить переменную x со значением 602560 в Java?
int x = 602560;
### Instruction: Как объявить переменную x со значением 602560 в Java? ### Response: int x = 602560;
23,059,671
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; }
96,980,513
en
C#
logic_ops
intermediate
Write logic to check if the year 2013 is a leap year in C#.
public bool IsLeap() { int y = 2013; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2013 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2013; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
31,040,258
en
C++
array_ops
intermediate
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; }
154,123
kk
C++
factorial
advanced
C++ тілінде 536 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(536) << std::endl;
### Instruction: C++ тілінде 536 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(536) << std::endl;
1,398,278
en
C++
var_decl
beginner
How to declare a variable total with value 161957 in C++?
int total = 161957;
### Instruction: How to declare a variable total with value 161957 in C++? ### Response: int total = 161957;
3,699,429
en
C#
var_decl
beginner
How to declare a variable result with value 172442 in C#?
int result = 172442;
### Instruction: How to declare a variable result with value 172442 in C#? ### Response: int result = 172442;
72,727,735
kk
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,702,619
kk
C#
var_decl
beginner
C# тілінде 848220 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 848220;
### Instruction: C# тілінде 848220 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 848220;
1,743,871
ru
Python
var_decl
beginner
Как объявить переменную speed со значением 736023 в Python?
speed = 736023
### Instruction: Как объявить переменную speed со значением 736023 в Python? ### Response: speed = 736023
30,227,110
kk
C++
logic_ops
advanced
C++ тилінде 398 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 398; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 398 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 398; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
14,682,574
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 13 простым.
function isPrime() { let n = 13; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 13 простым. ### Response: function isPrime() { let n = 13; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
15,738,181
kk
Unity
logic_ops
advanced
Unity тилінде 2003 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2003; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2003 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2003; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
46,165,403
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
3,948,218
ru
C#
var_decl
beginner
Как объявить переменную result со значением 143802 в C#?
int result = 143802;
### Instruction: Как объявить переменную result со значением 143802 в C#? ### Response: int result = 143802;
66,910,277
en
Java
string_ops
advanced
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
74,791,304
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,937,202
en
C#
var_decl
beginner
How to declare a variable count with value 744936 in C#?
int count = 744936;
### Instruction: How to declare a variable count with value 744936 in C#? ### Response: int count = 744936;
90,044,638
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1923 is a leap year in JavaScript.
function isLeap() { let y = 1923; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1923 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1923; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
16,647,527
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,489,102
en
Python
var_decl
beginner
How to declare a variable total with value 370215 in Python?
total = 370215
### Instruction: How to declare a variable total with value 370215 in Python? ### Response: total = 370215
69,567,038
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; }
725,246
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 4210-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4210));
### Instruction: JavaScript тілінде 1-ден 4210-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4210));
53,126,127
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
42,098,046
en
JavaScript
array_ops
intermediate
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);
4,955,916
ru
C++
var_decl
beginner
Как объявить переменную result со значением 381285 в C++?
int result = 381285;
### Instruction: Как объявить переменную result со значением 381285 в C++? ### Response: int result = 381285;
4,788,228
ru
Python
var_decl
beginner
Как объявить переменную health со значением 580265 в Python?
health = 580265
### Instruction: Как объявить переменную health со значением 580265 в Python? ### Response: health = 580265
84,463,040
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); }
10,273,654
ru
Python
string_ops
advanced
Напишите на Python функцию, которая считает количество гласных букв в тексте.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Напишите на Python функцию, которая считает количество гласных букв в тексте. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
4,877,320
ru
Python
var_decl
beginner
Как объявить переменную total со значением 145887 в Python?
total = 145887
### Instruction: Как объявить переменную total со значением 145887 в Python? ### Response: total = 145887
3,487,182
en
C#
var_decl
beginner
How to declare a variable index with value 32036 in C#?
int index = 32036;
### Instruction: How to declare a variable index with value 32036 in C#? ### Response: int index = 32036;
61,290,194
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,614,044
kk
C#
var_decl
beginner
C# тілінде 554093 мәнімен result айнымалысын қалай жариялауға болады?
int result = 554093;
### Instruction: C# тілінде 554093 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 554093;
587,805
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 7773.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7773));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 7773. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7773));
4,219,468
kk
JavaScript
var_decl
beginner
JavaScript тілінде 391981 мәнімен speed айнымалысын қалай жариялауға болады?
let speed = 391981;
### Instruction: JavaScript тілінде 391981 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: let speed = 391981;
16,475,560
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; }
30,472,207
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; }
97,399,150
ru
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; }
41,768,792
kk
Python
logic_ops
advanced
Python тилінде 1954 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1954 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1954 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1954 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
96,579,242
ru
Unity
array_ops
intermediate
Напишите на 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: Напишите на 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; }
85,787,480
ru
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);
2,683,793
kk
JavaScript
var_decl
beginner
JavaScript тілінде 76884 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 76884;
### Instruction: JavaScript тілінде 76884 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 76884;
94,875,186
ru
Python
array_ops
advanced
Напишите на Python функцию, которая фильтрует только четные числа из списка.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Напишите на Python функцию, которая фильтрует только четные числа из списка. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
2,375,090
en
C#
var_decl
beginner
How to declare a variable result with value 797514 in C#?
int result = 797514;
### Instruction: How to declare a variable result with value 797514 in C#? ### Response: int result = 797514;
35,503,239
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
3,232,642
en
C#
var_decl
beginner
How to declare a variable level with value 880889 in C#?
int level = 880889;
### Instruction: How to declare a variable level with value 880889 in C#? ### Response: int level = 880889;
39,905,188
kk
Java
string_ops
intermediate
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; }
84,181,932
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; }
40,386,823
ru
Unity
array_ops
intermediate
Напишите на 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: Напишите на 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; }
74,322,208
kk
Java
logic_ops
intermediate
Java тилінде 17 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 17; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 17 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 17; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,058,642
kk
Unity
var_decl
beginner
Unity тілінде 629721 мәнімен index айнымалысын қалай жариялауға болады?
int index = 629721;
### Instruction: Unity тілінде 629721 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 629721;
49,332,394
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; }
1,744,156
kk
C#
var_decl
beginner
C# тілінде 190464 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 190464;
### Instruction: C# тілінде 190464 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 190464;
3,486,243
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 243988 в Unity?
int result = 243988;
### Instruction: Как объявить переменную result со значением 243988 в Unity? ### Response: int result = 243988;
127,748
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 1805.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1805))
### Instruction: Write a function in Python that sums numbers from 1 to 1805. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1805))
57,726,652
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); }
4,719,189
en
C++
var_decl
beginner
How to declare a variable size with value 116247 in C++?
int size = 116247;
### Instruction: How to declare a variable size with value 116247 in C++? ### Response: int size = 116247;
2,655,965
ru
JavaScript
var_decl
beginner
Как объявить переменную weight со значением 569240 в JavaScript?
let weight = 569240;
### Instruction: Как объявить переменную weight со значением 569240 в JavaScript? ### Response: let weight = 569240;
47,648,511
en
Unity
logic_ops
advanced
Write a function that determines if the number 389 is prime in Unity.
public bool IsPrime() { int n = 389; 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 389 is prime in Unity. ### Response: public bool IsPrime() { int n = 389; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
28,902,840
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 486 простым.
public bool IsPrime() { int n = 486; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 486 простым. ### Response: public bool IsPrime() { int n = 486; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
26,123,481
kk
C#
logic_ops
advanced
C# тилінде 125 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 125; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 125 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 125; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,438,452
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 405244 in JavaScript?
let speed = 405244;
### Instruction: How to declare a variable speed with value 405244 in JavaScript? ### Response: let speed = 405244;
2,694,781
ru
Java
var_decl
beginner
Как объявить переменную timer со значением 663929 в Java?
int timer = 663929;
### Instruction: Как объявить переменную timer со значением 663929 в Java? ### Response: int timer = 663929;
4,155,600
kk
Python
var_decl
beginner
Python тілінде 697124 мәнімен weight айнымалысын қалай жариялауға болады?
weight = 697124
### Instruction: Python тілінде 697124 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: weight = 697124
670,774
ru
C++
var_decl
beginner
Как объявить переменную result со значением 164536 в C++?
int result = 164536;
### Instruction: Как объявить переменную result со значением 164536 в C++? ### Response: int result = 164536;