id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
344,955
ru
Unity
var_decl
beginner
Как объявить переменную total со значением 682468 в Unity?
int total = 682468;
### Instruction: Как объявить переменную total со значением 682468 в Unity? ### Response: int total = 682468;
97,485,782
ru
Java
string_ops
advanced
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
2,145,701
kk
Java
var_decl
beginner
Java тілінде 240157 мәнімен data айнымалысын қалай жариялауға болады?
int data = 240157;
### Instruction: Java тілінде 240157 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 240157;
1,600,828
en
C#
var_decl
beginner
How to declare a variable value with value 171315 in C#?
int value = 171315;
### Instruction: How to declare a variable value with value 171315 in C#? ### Response: int value = 171315;
95,166,016
kk
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]
1,640,243
en
C#
var_decl
beginner
How to declare a variable level with value 205462 in C#?
int level = 205462;
### Instruction: How to declare a variable level with value 205462 in C#? ### Response: int level = 205462;
87,516,151
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 1913 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1913; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1913 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1913; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
16,753,375
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
4,977,559
kk
Unity
var_decl
beginner
Unity тілінде 471547 мәнімен level айнымалысын қалай жариялауға болады?
int level = 471547;
### Instruction: Unity тілінде 471547 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 471547;
63,771,261
ru
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; }
65,573,177
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; }
84,668,043
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); }
38,828,341
ru
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; }
29,041,139
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
1,712,494
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 43015 в Python?
buffer = 43015
### Instruction: Как объявить переменную buffer со значением 43015 в Python? ### Response: buffer = 43015
40,817,897
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; }
11,288,073
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
4,789,741
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 909640 in JavaScript?
let limit = 909640;
### Instruction: How to declare a variable limit with value 909640 in JavaScript? ### Response: let limit = 909640;
58,855,136
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; }
72,732,480
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
78,850,380
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 479 is prime in JavaScript.
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: Write a function that determines if the number 479 is prime in JavaScript. ### 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; }
13,610,648
en
Python
logic_ops
intermediate
Write logic to check if the year 2042 is a leap year in Python.
def is_leap(): year = 2042 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2042 is a leap year in Python. ### Response: def is_leap(): year = 2042 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
2,975,225
ru
JavaScript
var_decl
beginner
Как объявить переменную rate со значением 384383 в JavaScript?
let rate = 384383;
### Instruction: Как объявить переменную rate со значением 384383 в JavaScript? ### Response: let rate = 384383;
92,940,683
en
Unity
logic_ops
intermediate
Write a function that determines if the number 364 is prime in Unity.
public bool IsPrime() { int n = 364; 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 364 is prime in Unity. ### Response: public bool IsPrime() { int n = 364; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
65,459,902
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; }
1,016,323
ru
Java
var_decl
beginner
Как объявить переменную speed со значением 86102 в Java?
int speed = 86102;
### Instruction: Как объявить переменную speed со значением 86102 в Java? ### Response: int speed = 86102;
2,264,953
kk
C#
var_decl
beginner
C# тілінде 843060 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 843060;
### Instruction: C# тілінде 843060 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 843060;
89,117,707
en
Java
logic_ops
intermediate
Write a function that determines if the number 465 is prime in Java.
public bool IsPrime() { int n = 465; 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 465 is prime in Java. ### Response: public bool IsPrime() { int n = 465; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
42,249,777
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; }
36,591,871
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; }
98,949,078
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 341 простым.
function isPrime() { let n = 341; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 341 простым. ### Response: function isPrime() { let n = 341; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
98,461,639
kk
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; }
64,758,163
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); }
2,496,467
kk
JavaScript
var_decl
beginner
JavaScript тілінде 571193 мәнімен value айнымалысын қалай жариялауға болады?
let value = 571193;
### Instruction: JavaScript тілінде 571193 мәнімен value айнымалысын қалай жариялауға болады? ### Response: let value = 571193;
18,067,562
en
C#
logic_ops
advanced
Write a function that determines if the number 332 is prime in C#.
public bool IsPrime() { int n = 332; 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 332 is prime in C#. ### Response: public bool IsPrime() { int n = 332; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,976,233
kk
Java
var_decl
beginner
Java тілінде 722683 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 722683;
### Instruction: Java тілінде 722683 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 722683;
4,264,189
kk
Python
var_decl
beginner
Python тілінде 937931 мәнімен total айнымалысын қалай жариялауға болады?
total = 937931
### Instruction: Python тілінде 937931 мәнімен total айнымалысын қалай жариялауға болады? ### Response: total = 937931
28,137,609
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
58,090,832
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 279 простым.
public bool IsPrime() { int n = 279; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 279 простым. ### Response: public bool IsPrime() { int n = 279; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
83,639,644
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; }
2,418,989
kk
C#
var_decl
beginner
C# тілінде 1339 мәнімен health айнымалысын қалай жариялауға болады?
int health = 1339;
### Instruction: C# тілінде 1339 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 1339;
55,549,342
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 4 простым.
public bool IsPrime() { int n = 4; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 4 простым. ### Response: public bool IsPrime() { int n = 4; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
57,008,882
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]
49,168,811
kk
Java
logic_ops
advanced
Java тилінде 452 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 452; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 452 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 452; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
10,992,576
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
1,523,916
en
C#
var_decl
beginner
How to declare a variable health with value 519696 in C#?
int health = 519696;
### Instruction: How to declare a variable health with value 519696 in C#? ### Response: int health = 519696;
89,260,239
en
C++
array_ops
intermediate
Write a function that reverses a list in C++.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C++. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
35,166,076
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(); }
78,099,650
kk
Python
logic_ops
intermediate
Python тилінде 248 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 248 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 248 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 248 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
4,590,964
en
Java
var_decl
beginner
How to declare a variable speed with value 674833 in Java?
int speed = 674833;
### Instruction: How to declare a variable speed with value 674833 in Java? ### Response: int speed = 674833;
1,449,873
kk
Java
var_decl
beginner
Java тілінде 149187 мәнімен index айнымалысын қалай жариялауға болады?
int index = 149187;
### Instruction: Java тілінде 149187 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 149187;
98,498,324
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2008 високосным.
public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2008 високосным. ### Response: public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
84,665,437
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
1,704,661
ru
C++
var_decl
beginner
Как объявить переменную index со значением 694003 в C++?
int index = 694003;
### Instruction: Как объявить переменную index со значением 694003 в C++? ### Response: int index = 694003;
1,547
kk
C#
sum_n
intermediate
C# тілінде 1-ден 1991-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1991));
### Instruction: C# тілінде 1-ден 1991-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1991));
3,967,964
kk
Python
var_decl
beginner
Python тілінде 663822 мәнімен timer айнымалысын қалай жариялауға болады?
timer = 663822
### Instruction: Python тілінде 663822 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: timer = 663822
28,189,313
en
C++
string_ops
intermediate
Write a function that checks if a string is a palindrome in C++.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C++. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
4,372,237
ru
JavaScript
var_decl
beginner
Как объявить переменную size со значением 572215 в JavaScript?
let size = 572215;
### Instruction: Как объявить переменную size со значением 572215 в JavaScript? ### Response: let size = 572215;
446,491
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 6782.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6782));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 6782. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6782));
4,288,319
kk
JavaScript
var_decl
beginner
JavaScript тілінде 855467 мәнімен score айнымалысын қалай жариялауға болады?
let score = 855467;
### Instruction: JavaScript тілінде 855467 мәнімен score айнымалысын қалай жариялауға болады? ### Response: let score = 855467;
48,213,034
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();
42,899,896
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; }
40,272,788
kk
Unity
logic_ops
advanced
Unity тилінде 2100 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2100; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2100 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2100; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
26,411,543
kk
Unity
array_ops
intermediate
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
54,669,332
en
C++
logic_ops
advanced
Write logic to check if the year 1998 is a leap year in C++.
public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1998 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,494,787
kk
C#
var_decl
beginner
C# тілінде 682892 мәнімен count айнымалысын қалай жариялауға болады?
int count = 682892;
### Instruction: C# тілінде 682892 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 682892;
32,188,935
kk
Java
logic_ops
advanced
Java тилінде 442 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 442; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 442 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 442; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
894,209
kk
Unity
var_decl
beginner
Unity тілінде 914467 мәнімен health айнымалысын қалай жариялауға болады?
int health = 914467;
### Instruction: Unity тілінде 914467 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 914467;
2,747,537
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 480613 в JavaScript?
let y = 480613;
### Instruction: Как объявить переменную y со значением 480613 в JavaScript? ### Response: let y = 480613;
135,905
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 475-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(475) << std::endl;
### Instruction: C++ тілінде 1-ден 475-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(475) << std::endl;
2,986,328
ru
JavaScript
var_decl
beginner
Как объявить переменную health со значением 858662 в JavaScript?
let health = 858662;
### Instruction: Как объявить переменную health со значением 858662 в JavaScript? ### Response: let health = 858662;
97,735,731
en
Unity
logic_ops
advanced
Write a function that determines if the number 302 is prime in Unity.
public bool IsPrime() { int n = 302; 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 302 is prime in Unity. ### Response: public bool IsPrime() { int n = 302; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
79,026,008
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('');
68,589,592
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 102 простым.
public bool IsPrime() { int n = 102; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 102 простым. ### Response: public bool IsPrime() { int n = 102; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
47,699,668
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 2002 високосным.
public bool IsLeap() { int y = 2002; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2002 високосным. ### Response: public bool IsLeap() { int y = 2002; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,898,577
ru
C++
var_decl
beginner
Как объявить переменную result со значением 782598 в C++?
int result = 782598;
### Instruction: Как объявить переменную result со значением 782598 в C++? ### Response: int result = 782598;
2,309,632
kk
Python
var_decl
beginner
Python тілінде 165243 мәнімен limit айнымалысын қалай жариялауға болады?
limit = 165243
### Instruction: Python тілінде 165243 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: limit = 165243
64,088,157
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
58,725,256
kk
Unity
array_ops
intermediate
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
70,156,733
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
87,049,903
en
Java
array_ops
intermediate
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
73,259,402
en
C++
logic_ops
intermediate
Write a function that determines if the number 7 is prime in C++.
public bool IsPrime() { int n = 7; 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 7 is prime in C++. ### Response: public bool IsPrime() { int n = 7; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
29,188,324
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
94,478,881
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; }
792,024
ru
Java
var_decl
beginner
Как объявить переменную limit со значением 878542 в Java?
int limit = 878542;
### Instruction: Как объявить переменную limit со значением 878542 в Java? ### Response: int limit = 878542;
45,072,188
en
C#
logic_ops
advanced
Write a function that determines if the number 412 is prime in C#.
public bool IsPrime() { int n = 412; 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 412 is prime in C#. ### Response: public bool IsPrime() { int n = 412; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
16,472,165
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)
45,149,782
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 37 простым.
public bool IsPrime() { int n = 37; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 37 простым. ### Response: public bool IsPrime() { int n = 37; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
488,239
kk
Unity
factorial
advanced
Unity тілінде 362 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(362)); }
### Instruction: Unity тілінде 362 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(362)); }
95,774,838
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1992 високосным.
def is_leap(): year = 1992 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1992 високосным. ### Response: def is_leap(): year = 1992 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
31,350,532
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
418,442
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 5289-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5289)); }
### Instruction: Unity тілінде 1-ден 5289-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5289)); }
65,279,411
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
29,990,978
kk
Java
logic_ops
intermediate
Java тилінде 1977 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1977; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1977 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1977; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
26,699,314
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2029 високосным.
public bool IsLeap() { int y = 2029; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2029 високосным. ### Response: public bool IsLeap() { int y = 2029; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,417,483
en
Java
var_decl
beginner
How to declare a variable speed with value 264269 in Java?
int speed = 264269;
### Instruction: How to declare a variable speed with value 264269 in Java? ### Response: int speed = 264269;
691,557
en
C#
var_decl
beginner
How to declare a variable index with value 917207 in C#?
int index = 917207;
### Instruction: How to declare a variable index with value 917207 in C#? ### Response: int index = 917207;
83,844,863
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; }
31,239,462
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
47,630,020
en
Python
logic_ops
intermediate
Write a function that determines if the number 227 is prime in Python.
def is_prime(): n = 227 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 227 is prime in Python. ### Response: def is_prime(): n = 227 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))