id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
17,861,890
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);
75,818,171
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1940 високосным.
def is_leap(): year = 1940 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1940 високосным. ### Response: def is_leap(): year = 1940 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,668,254
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 47339 в JavaScript?
let score = 47339;
### Instruction: Как объявить переменную score со значением 47339 в JavaScript? ### Response: let score = 47339;
68,362,643
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; }
3,483,435
kk
C#
var_decl
beginner
C# тілінде 590768 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 590768;
### Instruction: C# тілінде 590768 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 590768;
19,694,349
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 211 простым.
def is_prime(): n = 211 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 211 простым. ### Response: def is_prime(): n = 211 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
60,404,659
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('');
65,260,216
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,007,507
ru
Unity
var_decl
beginner
Как объявить переменную score со значением 93365 в Unity?
int score = 93365;
### Instruction: Как объявить переменную score со значением 93365 в Unity? ### Response: int score = 93365;
57,051,836
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; }
94,212,679
kk
Unity
string_ops
advanced
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; }
196,952
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 5434.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5434))
### Instruction: Write a function in Python that sums numbers from 1 to 5434. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5434))
4,977,014
en
Java
var_decl
beginner
How to declare a variable result with value 389897 in Java?
int result = 389897;
### Instruction: How to declare a variable result with value 389897 in Java? ### Response: int result = 389897;
59,029,951
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(); }
24,441,674
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1916 is a leap year in JavaScript.
function isLeap() { let y = 1916; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1916 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1916; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,610,526
kk
C#
var_decl
beginner
C# тілінде 112332 мәнімен y айнымалысын қалай жариялауға болады?
int y = 112332;
### Instruction: C# тілінде 112332 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 112332;
38,793,026
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
13,688,272
en
Java
string_ops
intermediate
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
10,916,401
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 404 простым.
public bool IsPrime() { int n = 404; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 404 простым. ### Response: public bool IsPrime() { int n = 404; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
600,307
en
Java
var_decl
beginner
How to declare a variable limit with value 974080 in Java?
int limit = 974080;
### Instruction: How to declare a variable limit with value 974080 in Java? ### Response: int limit = 974080;
940,727
ru
Java
var_decl
beginner
Как объявить переменную index со значением 138271 в Java?
int index = 138271;
### Instruction: Как объявить переменную index со значением 138271 в Java? ### Response: int index = 138271;
3,213,967
ru
C++
var_decl
beginner
Как объявить переменную size со значением 413534 в C++?
int size = 413534;
### Instruction: Как объявить переменную size со значением 413534 в C++? ### Response: int size = 413534;
4,904,808
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 125402 в Unity?
int buffer = 125402;
### Instruction: Как объявить переменную buffer со значением 125402 в Unity? ### Response: int buffer = 125402;
367,943
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 3689.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3689));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 3689. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3689));
41,549,115
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; }
79,843,382
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; }
49,548,806
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
35,457,378
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
30,762,098
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 2009 високосным.
function isLeap() { let y = 2009; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2009 високосным. ### Response: function isLeap() { let y = 2009; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
25,974,544
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; }
3,159,725
en
Java
var_decl
beginner
How to declare a variable timer with value 681410 in Java?
int timer = 681410;
### Instruction: How to declare a variable timer with value 681410 in Java? ### Response: int timer = 681410;
35,374,585
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; }
25,819,456
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
35,476,927
kk
Unity
logic_ops
intermediate
Unity тилінде 2031 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2031; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2031 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2031; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,322,457
en
Java
var_decl
beginner
How to declare a variable health with value 743910 in Java?
int health = 743910;
### Instruction: How to declare a variable health with value 743910 in Java? ### Response: int health = 743910;
11,022,089
en
C++
array_ops
advanced
Write a function that filters only even numbers from a list in C++.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C++. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
3,537,632
kk
JavaScript
var_decl
beginner
JavaScript тілінде 752221 мәнімен buffer айнымалысын қалай жариялауға болады?
let buffer = 752221;
### Instruction: JavaScript тілінде 752221 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: let buffer = 752221;
602,994
kk
C#
factorial
advanced
C# тілінде 4998 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4998));
### Instruction: C# тілінде 4998 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4998));
167,957
kk
Java
sum_n
intermediate
Java тілінде 1-ден 6059-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6059));
### Instruction: Java тілінде 1-ден 6059-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6059));
494,857
kk
Python
var_decl
beginner
Python тілінде 267957 мәнімен score айнымалысын қалай жариялауға болады?
score = 267957
### Instruction: Python тілінде 267957 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 267957
3,690,187
kk
JavaScript
var_decl
beginner
JavaScript тілінде 571099 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 571099;
### Instruction: JavaScript тілінде 571099 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 571099;
263,807
kk
C#
factorial
advanced
C# тілінде 959 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(959));
### Instruction: C# тілінде 959 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(959));
79,670,156
en
C++
logic_ops
advanced
Write logic to check if the year 1991 is a leap year in C++.
public bool IsLeap() { int y = 1991; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1991 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1991; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,873,760
en
Java
var_decl
beginner
How to declare a variable count with value 225864 in Java?
int count = 225864;
### Instruction: How to declare a variable count with value 225864 in Java? ### Response: int count = 225864;
582,892
kk
Java
sum_n
intermediate
Java тілінде 1-ден 9671-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9671));
### Instruction: Java тілінде 1-ден 9671-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9671));
3,646
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 6282.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6282) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 6282. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6282) << std::endl;
418,920
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 614.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(614));
### Instruction: Write a function in C# that sums numbers from 1 to 614. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(614));
61,390,835
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 285 is prime in JavaScript.
function isPrime() { let n = 285; 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 285 is prime in JavaScript. ### Response: function isPrime() { let n = 285; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,486,966
ru
Unity
var_decl
beginner
Как объявить переменную data со значением 588768 в Unity?
int data = 588768;
### Instruction: Как объявить переменную data со значением 588768 в Unity? ### Response: int data = 588768;
49,704,017
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; }
88,005,642
en
C++
logic_ops
advanced
Write a function that determines if the number 451 is prime in C++.
public bool IsPrime() { int n = 451; 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 451 is prime in C++. ### Response: public bool IsPrime() { int n = 451; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
23,033,380
en
C#
array_ops
advanced
Write a function that filters only even numbers from a list in C#.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C#. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
21,006,215
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 62 простым.
public bool IsPrime() { int n = 62; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 62 простым. ### Response: public bool IsPrime() { int n = 62; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,804,077
ru
Unity
var_decl
beginner
Как объявить переменную health со значением 812334 в Unity?
int health = 812334;
### Instruction: Как объявить переменную health со значением 812334 в Unity? ### Response: int health = 812334;
88,998,430
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,882,887
en
C#
var_decl
beginner
How to declare a variable limit with value 324063 in C#?
int limit = 324063;
### Instruction: How to declare a variable limit with value 324063 in C#? ### Response: int limit = 324063;
92,981,648
ru
Java
logic_ops
advanced
Напишите на 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; }
21,450,694
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; }
427,922
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 1442.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1442));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 1442. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1442));
68,356,515
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1928 високосным.
def is_leap(): year = 1928 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1928 високосным. ### Response: def is_leap(): year = 1928 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,580,215
kk
Java
var_decl
beginner
Java тілінде 944426 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 944426;
### Instruction: Java тілінде 944426 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 944426;
11,769
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 8887.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8887)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 8887. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8887)); }
2,376,490
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 429916 в Python?
rate = 429916
### Instruction: Как объявить переменную rate со значением 429916 в Python? ### Response: rate = 429916
1,653,574
ru
Python
var_decl
beginner
Как объявить переменную y со значением 336363 в Python?
y = 336363
### Instruction: Как объявить переменную y со значением 336363 в Python? ### Response: y = 336363
20,745,891
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
78,318,310
kk
Unity
string_ops
intermediate
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
98,971
kk
C++
factorial
advanced
C++ тілінде 7895 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7895) << std::endl;
### Instruction: C++ тілінде 7895 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7895) << std::endl;
59,963,939
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]
79,632,283
kk
Unity
logic_ops
advanced
Unity тилінде 1990 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1990; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1990 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1990; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
27,641,113
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]
446,510
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 6925.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6925));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 6925. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6925));
376,965
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 1138.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(1138))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 1138. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(1138))
36,519,695
en
C#
string_ops
intermediate
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(); }
43,583,382
en
Java
array_ops
advanced
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
1,045,223
ru
Java
var_decl
beginner
Как объявить переменную data со значением 908379 в Java?
int data = 908379;
### Instruction: Как объявить переменную data со значением 908379 в Java? ### Response: int data = 908379;
72,448,053
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;
486,677
en
C#
var_decl
beginner
How to declare a variable y with value 859434 in C#?
int y = 859434;
### Instruction: How to declare a variable y with value 859434 in C#? ### Response: int y = 859434;
2,496,062
en
Python
var_decl
beginner
How to declare a variable health with value 787309 in Python?
health = 787309
### Instruction: How to declare a variable health with value 787309 in Python? ### Response: health = 787309
76,302,760
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(); }
4,762,173
ru
C++
var_decl
beginner
Как объявить переменную result со значением 955876 в C++?
int result = 955876;
### Instruction: Как объявить переменную result со значением 955876 в C++? ### Response: int result = 955876;
66,366,083
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); }
1,281,111
kk
Unity
var_decl
beginner
Unity тілінде 323221 мәнімен index айнымалысын қалай жариялауға болады?
int index = 323221;
### Instruction: Unity тілінде 323221 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 323221;
41,297,562
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]
82,371,339
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 397 простым.
public bool IsPrime() { int n = 397; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 397 простым. ### Response: public bool IsPrime() { int n = 397; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
79,231,782
kk
Java
array_ops
intermediate
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
39,824,495
en
C++
logic_ops
intermediate
Write a function that determines if the number 14 is prime in C++.
public bool IsPrime() { int n = 14; 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 14 is prime in C++. ### Response: public bool IsPrime() { int n = 14; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
51,080,074
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]
2,383,237
kk
C++
var_decl
beginner
C++ тілінде 152709 мәнімен score айнымалысын қалай жариялауға болады?
int score = 152709;
### Instruction: C++ тілінде 152709 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 152709;
3,912,849
ru
Unity
var_decl
beginner
Как объявить переменную amount со значением 27826 в Unity?
int amount = 27826;
### Instruction: Как объявить переменную amount со значением 27826 в Unity? ### Response: int amount = 27826;
52,076,072
en
Unity
string_ops
intermediate
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
86,250,287
ru
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; }
29,883,086
kk
Python
logic_ops
advanced
Python тилінде 431 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 431 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 431 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 431 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
281,027
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 9243.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9243));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 9243. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9243));
3,400,634
kk
Python
var_decl
beginner
Python тілінде 840448 мәнімен rate айнымалысын қалай жариялауға болады?
rate = 840448
### Instruction: Python тілінде 840448 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: rate = 840448
4,029,160
ru
C#
var_decl
beginner
Как объявить переменную value со значением 426151 в C#?
int value = 426151;
### Instruction: Как объявить переменную value со значением 426151 в C#? ### Response: int value = 426151;
90,557,929
ru
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); }
50,344,760
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 47 is prime in JavaScript.
function isPrime() { let n = 47; 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 47 is prime in JavaScript. ### Response: function isPrime() { let n = 47; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
4,667,864
kk
C++
var_decl
beginner
C++ тілінде 405343 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 405343;
### Instruction: C++ тілінде 405343 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 405343;
50,000,793
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,146,435
kk
C++
var_decl
beginner
C++ тілінде 661418 мәнімен data айнымалысын қалай жариялауға болады?
int data = 661418;
### Instruction: C++ тілінде 661418 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 661418;