id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
32,185,924
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; }
3,738,644
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 858148 в JavaScript?
let data = 858148;
### Instruction: Как объявить переменную data со значением 858148 в JavaScript? ### Response: let data = 858148;
2,343,529
kk
Java
var_decl
beginner
Java тілінде 298689 мәнімен total айнымалысын қалай жариялауға болады?
int total = 298689;
### Instruction: Java тілінде 298689 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 298689;
2,538,340
ru
Python
var_decl
beginner
Как объявить переменную level со значением 388848 в Python?
level = 388848
### Instruction: Как объявить переменную level со значением 388848 в Python? ### Response: level = 388848
57,405,413
kk
C++
array_ops
intermediate
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
4,476,015
en
C#
var_decl
beginner
How to declare a variable x with value 124949 in C#?
int x = 124949;
### Instruction: How to declare a variable x with value 124949 in C#? ### Response: int x = 124949;
1,937,725
en
Java
var_decl
beginner
How to declare a variable count with value 574498 in Java?
int count = 574498;
### Instruction: How to declare a variable count with value 574498 in Java? ### Response: int count = 574498;
28,826,252
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; }
67,653,057
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; }
3,541,687
en
Python
var_decl
beginner
How to declare a variable amount with value 535908 in Python?
amount = 535908
### Instruction: How to declare a variable amount with value 535908 in Python? ### Response: amount = 535908
13,096,166
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)
50,505,414
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(); }
85,117,071
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
3,739,544
kk
JavaScript
var_decl
beginner
JavaScript тілінде 82018 мәнімен y айнымалысын қалай жариялауға болады?
let y = 82018;
### Instruction: JavaScript тілінде 82018 мәнімен y айнымалысын қалай жариялауға болады? ### Response: let y = 82018;
44,158,046
kk
Unity
logic_ops
advanced
Unity тилінде 138 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 138; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 138 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 138; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
84,389,128
ru
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; }
68,386,997
en
Python
logic_ops
advanced
Write a function that determines if the number 427 is prime in Python.
def is_prime(): n = 427 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Write a function that determines if the number 427 is prime in Python. ### Response: def is_prime(): n = 427 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,396,307
ru
Unity
var_decl
beginner
Как объявить переменную x со значением 110688 в Unity?
int x = 110688;
### Instruction: Как объявить переменную x со значением 110688 в Unity? ### Response: int x = 110688;
33,281,831
en
Unity
logic_ops
intermediate
Write logic to check if the year 2076 is a leap year in Unity.
public bool IsLeap() { int y = 2076; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2076 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2076; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,220,700
ru
Java
var_decl
beginner
Как объявить переменную value со значением 757648 в Java?
int value = 757648;
### Instruction: Как объявить переменную value со значением 757648 в Java? ### Response: int value = 757648;
86,486,577
kk
Unity
logic_ops
intermediate
Unity тилінде 2079 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2079; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2079 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2079; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
70,948,318
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; }
38,397,126
en
C#
logic_ops
advanced
Write a function that determines if the number 362 is prime in C#.
public bool IsPrime() { int n = 362; 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 362 is prime in C#. ### Response: public bool IsPrime() { int n = 362; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
468,296
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 6137.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(6137));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 6137. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(6137));
1,029,689
ru
Python
var_decl
beginner
Как объявить переменную result со значением 937012 в Python?
result = 937012
### Instruction: Как объявить переменную result со значением 937012 в Python? ### Response: result = 937012
520,750
kk
JavaScript
factorial
advanced
JavaScript тілінде 629 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(629));
### Instruction: JavaScript тілінде 629 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(629));
81,160,134
kk
Java
logic_ops
advanced
Java тилінде 1985 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1985; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1985 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1985; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
16,265,227
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);
1,678,344
en
Python
var_decl
beginner
How to declare a variable timer with value 398436 in Python?
timer = 398436
### Instruction: How to declare a variable timer with value 398436 in Python? ### Response: timer = 398436
71,250,576
ru
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]
3,843,890
ru
Java
var_decl
beginner
Как объявить переменную value со значением 489298 в Java?
int value = 489298;
### Instruction: Как объявить переменную value со значением 489298 в Java? ### Response: int value = 489298;
167,026
kk
Python
sum_n
intermediate
Python тілінде 1-ден 9635-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9635))
### Instruction: Python тілінде 1-ден 9635-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9635))
72,207,910
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 421 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 421; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 421 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 421; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
41,108,192
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
35,478,011
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 75 простым.
function isPrime() { let n = 75; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 75 простым. ### Response: function isPrime() { let n = 75; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
1,739,834
en
Java
var_decl
beginner
How to declare a variable amount with value 700183 in Java?
int amount = 700183;
### Instruction: How to declare a variable amount with value 700183 in Java? ### Response: int amount = 700183;
72,990,952
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; }
819,542
en
Python
var_decl
beginner
How to declare a variable index with value 949242 in Python?
index = 949242
### Instruction: How to declare a variable index with value 949242 in Python? ### Response: index = 949242
67,742,967
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('');
69,875,234
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(); }
61,792,025
en
JavaScript
string_ops
intermediate
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();
1,500,137
kk
Java
var_decl
beginner
Java тілінде 694171 мәнімен health айнымалысын қалай жариялауға болады?
int health = 694171;
### Instruction: Java тілінде 694171 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 694171;
74,993,281
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
92,828,619
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
67,864,359
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(); }
52,636,502
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 84 простым.
public bool IsPrime() { int n = 84; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 84 простым. ### Response: public bool IsPrime() { int n = 84; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
72,238,430
kk
Java
string_ops
advanced
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,378,598
en
Python
var_decl
beginner
How to declare a variable data with value 683512 in Python?
data = 683512
### Instruction: How to declare a variable data with value 683512 in Python? ### Response: data = 683512
45,558,098
kk
Java
logic_ops
intermediate
Java тилінде 443 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 443; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 443 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 443; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
85,106,155
en
Python
array_ops
advanced
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
97,184,728
en
JavaScript
string_ops
intermediate
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();
98,255,550
en
C#
logic_ops
intermediate
Write logic to check if the year 2049 is a leap year in C#.
public bool IsLeap() { int y = 2049; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2049 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2049; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
99,316,008
en
Unity
string_ops
advanced
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; }
11,603,573
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; }
3,387,245
ru
C#
var_decl
beginner
Как объявить переменную value со значением 615348 в C#?
int value = 615348;
### Instruction: Как объявить переменную value со значением 615348 в C#? ### Response: int value = 615348;
54,808,976
kk
Python
string_ops
advanced
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
1,129,947
en
C#
var_decl
beginner
How to declare a variable score with value 933673 in C#?
int score = 933673;
### Instruction: How to declare a variable score with value 933673 in C#? ### Response: int score = 933673;
54,040,043
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 251 простым.
def is_prime(): n = 251 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 251 простым. ### Response: def is_prime(): n = 251 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
63,450,971
ru
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; }
44,672,887
kk
Unity
array_ops
advanced
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; }
2,475,048
ru
JavaScript
var_decl
beginner
Как объявить переменную offset со значением 746005 в JavaScript?
let offset = 746005;
### Instruction: Как объявить переменную offset со значением 746005 в JavaScript? ### Response: let offset = 746005;
69,914,772
en
Unity
string_ops
intermediate
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,078,609
en
C#
var_decl
beginner
How to declare a variable size with value 527939 in C#?
int size = 527939;
### Instruction: How to declare a variable size with value 527939 in C#? ### Response: int size = 527939;
11,117,282
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; }
4,840,822
kk
Python
var_decl
beginner
Python тілінде 323386 мәнімен rate айнымалысын қалай жариялауға болады?
rate = 323386
### Instruction: Python тілінде 323386 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: rate = 323386
213,747
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 6586.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6586) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 6586. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6586) << std::endl;
289,950
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 1834-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1834));
### Instruction: JavaScript тілінде 1-ден 1834-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1834));
48,257,907
en
Java
logic_ops
advanced
Write a function that determines if the number 495 is prime in Java.
public bool IsPrime() { int n = 495; 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 495 is prime in Java. ### Response: public bool IsPrime() { int n = 495; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
54,659
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 7555-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7555));
### Instruction: JavaScript тілінде 1-ден 7555-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7555));
32,993,818
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,257,606
en
JavaScript
var_decl
beginner
How to declare a variable result with value 722596 in JavaScript?
let result = 722596;
### Instruction: How to declare a variable result with value 722596 in JavaScript? ### Response: let result = 722596;
59,550,185
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('');
63,478,358
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; }
705,315
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 7130.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7130));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 7130. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7130));
21,209,087
kk
Python
logic_ops
advanced
Python тилінде 203 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 203 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 203 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 203 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
90,682,083
en
Python
logic_ops
intermediate
Write a function that determines if the number 384 is prime in Python.
def is_prime(): n = 384 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Write a function that determines if the number 384 is prime in Python. ### Response: def is_prime(): n = 384 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
80,933,962
en
JavaScript
string_ops
advanced
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;
4,097,064
en
C++
var_decl
beginner
How to declare a variable level with value 484812 in C++?
int level = 484812;
### Instruction: How to declare a variable level with value 484812 in C++? ### Response: int level = 484812;
49,458,338
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
75,256,186
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(); }
69,240,642
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(); }
26,984,511
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(); }
3,650,052
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 387397 в JavaScript?
let data = 387397;
### Instruction: Как объявить переменную data со значением 387397 в JavaScript? ### Response: let data = 387397;
2,726,795
en
Python
var_decl
beginner
How to declare a variable buffer with value 380107 in Python?
buffer = 380107
### Instruction: How to declare a variable buffer with value 380107 in Python? ### Response: buffer = 380107
58,852,303
kk
Java
logic_ops
advanced
Java тилінде 1916 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1916; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1916 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1916; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
89,579,067
kk
C#
logic_ops
advanced
C# тилінде 408 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 408; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 408 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 408; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
71,573,282
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; }
2,935,162
ru
Unity
var_decl
beginner
Как объявить переменную count со значением 792250 в Unity?
int count = 792250;
### Instruction: Как объявить переменную count со значением 792250 в Unity? ### Response: int count = 792250;
53,043,216
kk
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; }
36,781,955
kk
C++
array_ops
intermediate
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
10,065,318
kk
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; }
2,788,131
en
C++
var_decl
beginner
How to declare a variable size with value 324122 in C++?
int size = 324122;
### Instruction: How to declare a variable size with value 324122 in C++? ### Response: int size = 324122;
11,567,204
kk
Unity
string_ops
advanced
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,926,971
en
Unity
var_decl
beginner
How to declare a variable index with value 263157 in Unity?
int index = 263157;
### Instruction: How to declare a variable index with value 263157 in Unity? ### Response: int index = 263157;
278,154
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 301.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(301))
### Instruction: Write a function in Python that calculates the factorial of 301. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(301))
4,615,400
ru
Unity
var_decl
beginner
Как объявить переменную count со значением 493275 в Unity?
int count = 493275;
### Instruction: Как объявить переменную count со значением 493275 в Unity? ### Response: int count = 493275;
62,159,230
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 450 простым.
public bool IsPrime() { int n = 450; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 450 простым. ### Response: public bool IsPrime() { int n = 450; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
67,857,882
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; }
65,639,486
en
Java
logic_ops
advanced
Write logic to check if the year 2027 is a leap year in Java.
public bool IsLeap() { int y = 2027; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2027 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2027; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
139,453
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 8825.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8825));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 8825. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8825));