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
2,265,553
en
Unity
var_decl
beginner
How to declare a variable buffer with value 663169 in Unity?
int buffer = 663169;
### Instruction: How to declare a variable buffer with value 663169 in Unity? ### Response: int buffer = 663169;
99,209,913
kk
Python
logic_ops
intermediate
Python тилінде 252 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 252 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 252 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 252 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
76,107,939
ru
C#
array_ops
advanced
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,497,085
en
JavaScript
var_decl
beginner
How to declare a variable count with value 653355 in JavaScript?
let count = 653355;
### Instruction: How to declare a variable count with value 653355 in JavaScript? ### Response: let count = 653355;
90,746,460
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;
3,773,350
ru
Unity
var_decl
beginner
Как объявить переменную health со значением 683493 в Unity?
int health = 683493;
### Instruction: Как объявить переменную health со значением 683493 в Unity? ### Response: int health = 683493;
70,998,919
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
14,921,203
kk
C#
logic_ops
advanced
C# тилінде 2013 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2013; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2013 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2013; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
644,242
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 1775.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(1775));
### Instruction: Write a function in C# that calculates the factorial of 1775. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(1775));
12,916,213
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; }
75,082,952
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 148 простым.
function isPrime() { let n = 148; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 148 простым. ### Response: function isPrime() { let n = 148; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
404,561
en
Unity
var_decl
beginner
How to declare a variable health with value 71550 in Unity?
int health = 71550;
### Instruction: How to declare a variable health with value 71550 in Unity? ### Response: int health = 71550;
810,034
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 994468 в Unity?
int timer = 994468;
### Instruction: Как объявить переменную timer со значением 994468 в Unity? ### Response: int timer = 994468;
558,889
ru
JavaScript
var_decl
beginner
Как объявить переменную health со значением 532882 в JavaScript?
let health = 532882;
### Instruction: Как объявить переменную health со значением 532882 в JavaScript? ### Response: let health = 532882;
4,713,662
kk
C#
var_decl
beginner
C# тілінде 439981 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 439981;
### Instruction: C# тілінде 439981 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 439981;
109,714
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 402518 in JavaScript?
let limit = 402518;
### Instruction: How to declare a variable limit with value 402518 in JavaScript? ### Response: let limit = 402518;
94,669,473
en
JavaScript
array_ops
intermediate
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
2,633,505
kk
C++
var_decl
beginner
C++ тілінде 146784 мәнімен x айнымалысын қалай жариялауға болады?
int x = 146784;
### Instruction: C++ тілінде 146784 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 146784;
1,559,399
kk
Unity
var_decl
beginner
Unity тілінде 402146 мәнімен value айнымалысын қалай жариялауға болады?
int value = 402146;
### Instruction: Unity тілінде 402146 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 402146;
88,329,952
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 2011 високосным.
public bool IsLeap() { int y = 2011; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2011 високосным. ### Response: public bool IsLeap() { int y = 2011; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
107,459
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 8327.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8327));
### Instruction: Write a function in JavaScript that calculates the factorial of 8327. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8327));
55,711,083
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(); }
201,968
kk
C#
factorial
advanced
C# тілінде 4766 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4766));
### Instruction: C# тілінде 4766 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4766));
68,573,998
ru
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; }
58,780,296
en
C++
logic_ops
intermediate
Write logic to check if the year 1992 is a leap year in C++.
public bool IsLeap() { int y = 1992; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1992 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1992; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
72,708,754
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
88,433,974
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
3,638,717
ru
C#
var_decl
beginner
Как объявить переменную score со значением 577355 в C#?
int score = 577355;
### Instruction: Как объявить переменную score со значением 577355 в C#? ### Response: int score = 577355;
18,951,325
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(); }
13,397,557
en
Python
logic_ops
intermediate
Write logic to check if the year 1970 is a leap year in Python.
def is_leap(): year = 1970 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1970 is a leap year in Python. ### Response: def is_leap(): year = 1970 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
430,968
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 1138.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1138));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 1138. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1138));
27,297,208
kk
Java
logic_ops
intermediate
Java тилінде 253 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 253; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 253 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 253; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
367,815
kk
Unity
factorial
advanced
Unity тілінде 1546 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1546)); }
### Instruction: Unity тілінде 1546 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1546)); }
2,243,784
en
C++
var_decl
beginner
How to declare a variable amount with value 25464 in C++?
int amount = 25464;
### Instruction: How to declare a variable amount with value 25464 in C++? ### Response: int amount = 25464;
26,713,627
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
59,261,081
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1915 високосным.
function isLeap() { let y = 1915; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1915 високосным. ### Response: function isLeap() { let y = 1915; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
765,763
ru
Python
var_decl
beginner
Как объявить переменную limit со значением 429641 в Python?
limit = 429641
### Instruction: Как объявить переменную limit со значением 429641 в Python? ### Response: limit = 429641
1,752,785
ru
C++
var_decl
beginner
Как объявить переменную total со значением 773787 в C++?
int total = 773787;
### Instruction: Как объявить переменную total со значением 773787 в C++? ### Response: int total = 773787;
2,653,612
ru
Unity
var_decl
beginner
Как объявить переменную y со значением 682597 в Unity?
int y = 682597;
### Instruction: Как объявить переменную y со значением 682597 в Unity? ### Response: int y = 682597;
17,866,066
en
C#
string_ops
advanced
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; }
607,975
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 2507.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2507));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 2507. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2507));
3,984,081
kk
Python
var_decl
beginner
Python тілінде 571963 мәнімен speed айнымалысын қалай жариялауға болады?
speed = 571963
### Instruction: Python тілінде 571963 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: speed = 571963
78,368,787
kk
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; }
79,073,098
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 153 простым.
public bool IsPrime() { int n = 153; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 153 простым. ### Response: public bool IsPrime() { int n = 153; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
55,222,881
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; }
4,011,721
en
Java
var_decl
beginner
How to declare a variable score with value 916937 in Java?
int score = 916937;
### Instruction: How to declare a variable score with value 916937 in Java? ### Response: int score = 916937;
56,622,975
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 216 простым.
public bool IsPrime() { int n = 216; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 216 простым. ### Response: public bool IsPrime() { int n = 216; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,604,499
ru
C#
var_decl
beginner
Как объявить переменную level со значением 426127 в C#?
int level = 426127;
### Instruction: Как объявить переменную level со значением 426127 в C#? ### Response: int level = 426127;
49,981,491
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); }
632,465
en
Unity
var_decl
beginner
How to declare a variable size with value 727276 in Unity?
int size = 727276;
### Instruction: How to declare a variable size with value 727276 in Unity? ### Response: int size = 727276;
4,236,616
en
C++
var_decl
beginner
How to declare a variable timer with value 720666 in C++?
int timer = 720666;
### Instruction: How to declare a variable timer with value 720666 in C++? ### Response: int timer = 720666;
231,240
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 7929.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7929)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 7929. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7929)); }
67,996,664
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
59,508,656
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
79,537,920
en
C++
logic_ops
advanced
Write logic to check if the year 2066 is a leap year in C++.
public bool IsLeap() { int y = 2066; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2066 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2066; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,413,070
kk
C#
var_decl
beginner
C# тілінде 776399 мәнімен x айнымалысын қалай жариялауға болады?
int x = 776399;
### Instruction: C# тілінде 776399 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 776399;
1,502
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 1469.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1469))
### Instruction: Write a function in Python that sums numbers from 1 to 1469. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1469))
27,557
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 8941.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8941));
### Instruction: Write a function in JavaScript that calculates the factorial of 8941. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8941));
77,037,491
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 2074 високосным.
function isLeap() { let y = 2074; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2074 високосным. ### Response: function isLeap() { let y = 2074; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
879,824
kk
Java
var_decl
beginner
Java тілінде 198011 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 198011;
### Instruction: Java тілінде 198011 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 198011;
3,369,514
en
JavaScript
var_decl
beginner
How to declare a variable index with value 825739 in JavaScript?
let index = 825739;
### Instruction: How to declare a variable index with value 825739 in JavaScript? ### Response: let index = 825739;
65,055,318
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; }
16,861,654
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 192 is prime in JavaScript.
function isPrime() { let n = 192; 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 192 is prime in JavaScript. ### Response: function isPrime() { let n = 192; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
74,040,334
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();
69,768,275
en
Python
array_ops
intermediate
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]
92,294,735
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
16,581,790
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); }
26,749,485
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2008 високосным.
public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2008 високосным. ### Response: public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
59,295,768
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Unity функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,524,668
kk
JavaScript
var_decl
beginner
JavaScript тілінде 903909 мәнімен value айнымалысын қалай жариялауға болады?
let value = 903909;
### Instruction: JavaScript тілінде 903909 мәнімен value айнымалысын қалай жариялауға болады? ### Response: let value = 903909;
75,331,583
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1958 високосным.
public bool IsLeap() { int y = 1958; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1958 високосным. ### Response: public bool IsLeap() { int y = 1958; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,212,126
en
Java
var_decl
beginner
How to declare a variable level with value 112122 in Java?
int level = 112122;
### Instruction: How to declare a variable level with value 112122 in Java? ### Response: int level = 112122;
60,529,876
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]
4,311,385
en
Java
var_decl
beginner
How to declare a variable index with value 906489 in Java?
int index = 906489;
### Instruction: How to declare a variable index with value 906489 in Java? ### Response: int index = 906489;
1,952,925
ru
Java
var_decl
beginner
Как объявить переменную health со значением 342539 в Java?
int health = 342539;
### Instruction: Как объявить переменную health со значением 342539 в Java? ### Response: int health = 342539;
4,538,982
kk
Python
var_decl
beginner
Python тілінде 196570 мәнімен amount айнымалысын қалай жариялауға болады?
amount = 196570
### Instruction: Python тілінде 196570 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: amount = 196570
29,468,991
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
4,940,381
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 363479 в C#?
int buffer = 363479;
### Instruction: Как объявить переменную buffer со значением 363479 в C#? ### Response: int buffer = 363479;
56,399,832
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
52,118,333
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); }
387,935
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 4480.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4480));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 4480. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4480));
4,254,063
kk
Unity
var_decl
beginner
Unity тілінде 315427 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 315427;
### Instruction: Unity тілінде 315427 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 315427;
1,939,457
ru
Unity
var_decl
beginner
Как объявить переменную limit со значением 655480 в Unity?
int limit = 655480;
### Instruction: Как объявить переменную limit со значением 655480 в Unity? ### Response: int limit = 655480;
37,192,082
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
711,520
en
JavaScript
var_decl
beginner
How to declare a variable rate with value 847459 in JavaScript?
let rate = 847459;
### Instruction: How to declare a variable rate with value 847459 in JavaScript? ### Response: let rate = 847459;
58,013,139
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
3,530,597
en
C++
var_decl
beginner
How to declare a variable timer with value 724280 in C++?
int timer = 724280;
### Instruction: How to declare a variable timer with value 724280 in C++? ### Response: int timer = 724280;
12,853,452
en
Unity
array_ops
advanced
Write a function that finds the maximum number in an array in Unity.
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 Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
19,812,814
kk
Unity
logic_ops
intermediate
Unity тилінде 1980 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1980; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1980 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1980; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,511,323
kk
C#
var_decl
beginner
C# тілінде 285292 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 285292;
### Instruction: C# тілінде 285292 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 285292;
94,185,932
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
98,376,996
kk
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; }
77,334,943
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 156 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 156; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 156 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 156; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
521,736
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 5711.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(5711));
### Instruction: Write a function in C# that sums numbers from 1 to 5711. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(5711));
3,679,907
ru
C#
var_decl
beginner
Как объявить переменную data со значением 300074 в C#?
int data = 300074;
### Instruction: Как объявить переменную data со значением 300074 в C#? ### Response: int data = 300074;
2,809,070
ru
C++
var_decl
beginner
Как объявить переменную weight со значением 328988 в C++?
int weight = 328988;
### Instruction: Как объявить переменную weight со значением 328988 в C++? ### Response: int weight = 328988;
78,316,580
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
21,218,328
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(); }
32,897,288
en
Python
logic_ops
intermediate
Write logic to check if the year 1951 is a leap year in Python.
def is_leap(): year = 1951 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1951 is a leap year in Python. ### Response: def is_leap(): year = 1951 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,619,199
en
C++
var_decl
beginner
How to declare a variable count with value 687082 in C++?
int count = 687082;
### Instruction: How to declare a variable count with value 687082 in C++? ### Response: int count = 687082;