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
28,482,741
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
4,883,904
kk
Unity
var_decl
beginner
Unity тілінде 798617 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 798617;
### Instruction: Unity тілінде 798617 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 798617;
94,770,308
en
Unity
logic_ops
intermediate
Write a function that determines if the number 239 is prime in Unity.
public bool IsPrime() { int n = 239; 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 239 is prime in Unity. ### Response: public bool IsPrime() { int n = 239; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
15,687,872
ru
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);
4,095,726
ru
Unity
var_decl
beginner
Как объявить переменную index со значением 284157 в Unity?
int index = 284157;
### Instruction: Как объявить переменную index со значением 284157 в Unity? ### Response: int index = 284157;
23,019,992
en
Unity
logic_ops
intermediate
Write a function that determines if the number 379 is prime in Unity.
public bool IsPrime() { int n = 379; 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 379 is prime in Unity. ### Response: public bool IsPrime() { int n = 379; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
5,598
ru
Java
var_decl
beginner
Как объявить переменную x со значением 743173 в Java?
int x = 743173;
### Instruction: Как объявить переменную x со значением 743173 в Java? ### Response: int x = 743173;
4,933,246
en
JavaScript
var_decl
beginner
How to declare a variable y with value 276145 in JavaScript?
let y = 276145;
### Instruction: How to declare a variable y with value 276145 in JavaScript? ### Response: let y = 276145;
3,517,682
kk
JavaScript
var_decl
beginner
JavaScript тілінде 142175 мәнімен x айнымалысын қалай жариялауға болады?
let x = 142175;
### Instruction: JavaScript тілінде 142175 мәнімен x айнымалысын қалай жариялауға болады? ### Response: let x = 142175;
173,806
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 2948.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2948))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 2948. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2948))
2,855,762
ru
JavaScript
var_decl
beginner
Как объявить переменную value со значением 355936 в JavaScript?
let value = 355936;
### Instruction: Как объявить переменную value со значением 355936 в JavaScript? ### Response: let value = 355936;
67,428,618
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 2023 високосным.
public bool IsLeap() { int y = 2023; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2023 високосным. ### Response: public bool IsLeap() { int y = 2023; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
51,492,112
en
C#
logic_ops
advanced
Write logic to check if the year 2068 is a leap year in C#.
public bool IsLeap() { int y = 2068; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2068 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2068; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,656,567
ru
JavaScript
var_decl
beginner
Как объявить переменную result со значением 772525 в JavaScript?
let result = 772525;
### Instruction: Как объявить переменную result со значением 772525 в JavaScript? ### Response: let result = 772525;
22,858,378
kk
Java
string_ops
intermediate
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
72,648,483
kk
C++
array_ops
intermediate
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
1,189,849
kk
C#
var_decl
beginner
C# тілінде 922199 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 922199;
### Instruction: C# тілінде 922199 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 922199;
4,308,221
kk
C++
var_decl
beginner
C++ тілінде 40899 мәнімен index айнымалысын қалай жариялауға болады?
int index = 40899;
### Instruction: C++ тілінде 40899 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 40899;
140,486
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 8328-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8328));
### Instruction: JavaScript тілінде 1-ден 8328-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8328));
1,037,856
ru
C++
var_decl
beginner
Как объявить переменную size со значением 736325 в C++?
int size = 736325;
### Instruction: Как объявить переменную size со значением 736325 в C++? ### Response: int size = 736325;
88,812
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 3168.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3168));
### Instruction: Write a function in Java that sums numbers from 1 to 3168. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3168));
4,235,004
ru
C++
var_decl
beginner
Как объявить переменную weight со значением 961118 в C++?
int weight = 961118;
### Instruction: Как объявить переменную weight со значением 961118 в C++? ### Response: int weight = 961118;
77,225,545
en
Unity
array_ops
intermediate
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
3,660,546
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 560464 в JavaScript?
let total = 560464;
### Instruction: Как объявить переменную total со значением 560464 в JavaScript? ### Response: let total = 560464;
13,764,519
en
Unity
logic_ops
advanced
Write logic to check if the year 1977 is a leap year in Unity.
public bool IsLeap() { int y = 1977; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1977 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1977; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
69,275,984
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; }
787,138
en
C#
var_decl
beginner
How to declare a variable total with value 136054 in C#?
int total = 136054;
### Instruction: How to declare a variable total with value 136054 in C#? ### Response: int total = 136054;
3,354,632
en
Python
var_decl
beginner
How to declare a variable speed with value 750238 in Python?
speed = 750238
### Instruction: How to declare a variable speed with value 750238 in Python? ### Response: speed = 750238
2,446,635
ru
Java
var_decl
beginner
Как объявить переменную total со значением 959016 в Java?
int total = 959016;
### Instruction: Как объявить переменную total со значением 959016 в Java? ### Response: int total = 959016;
52,383,702
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); }
44,743,634
en
C++
logic_ops
advanced
Write a function that determines if the number 399 is prime in C++.
public bool IsPrime() { int n = 399; 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 399 is prime in C++. ### Response: public bool IsPrime() { int n = 399; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
43,452,192
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
1,642,152
kk
JavaScript
var_decl
beginner
JavaScript тілінде 702712 мәнімен speed айнымалысын қалай жариялауға болады?
let speed = 702712;
### Instruction: JavaScript тілінде 702712 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: let speed = 702712;
35,818,858
en
C#
string_ops
advanced
Write a function that counts vowels in a text in C#.
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 C#. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
607,108
ru
Python
var_decl
beginner
Как объявить переменную total со значением 66488 в Python?
total = 66488
### Instruction: Как объявить переменную total со значением 66488 в Python? ### Response: total = 66488
4,517,256
ru
JavaScript
var_decl
beginner
Как объявить переменную rate со значением 258245 в JavaScript?
let rate = 258245;
### Instruction: Как объявить переменную rate со значением 258245 в JavaScript? ### Response: let rate = 258245;
64,909,555
en
C++
logic_ops
advanced
Write a function that determines if the number 424 is prime in C++.
public bool IsPrime() { int n = 424; 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 424 is prime in C++. ### Response: public bool IsPrime() { int n = 424; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
33,245,967
kk
Unity
logic_ops
advanced
Unity тилінде 2014 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2014; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2014 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2014; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
48,323,965
en
Python
logic_ops
advanced
Write logic to check if the year 2084 is a leap year in Python.
def is_leap(): year = 2084 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2084 is a leap year in Python. ### Response: def is_leap(): year = 2084 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
81,853,206
kk
Unity
array_ops
intermediate
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; }
62,776,253
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,526,082
kk
Java
var_decl
beginner
Java тілінде 745419 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 745419;
### Instruction: Java тілінде 745419 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 745419;
807,711
ru
Unity
var_decl
beginner
Как объявить переменную weight со значением 739735 в Unity?
int weight = 739735;
### Instruction: Как объявить переменную weight со значением 739735 в Unity? ### Response: int weight = 739735;
4,624,730
ru
Java
var_decl
beginner
Как объявить переменную data со значением 816324 в Java?
int data = 816324;
### Instruction: Как объявить переменную data со значением 816324 в Java? ### Response: int data = 816324;
2,215,481
ru
Unity
var_decl
beginner
Как объявить переменную index со значением 769191 в Unity?
int index = 769191;
### Instruction: Как объявить переменную index со значением 769191 в Unity? ### Response: int index = 769191;
81,103,328
kk
C++
array_ops
intermediate
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
21,423,062
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; }
25,039,657
kk
C++
array_ops
intermediate
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,381,587
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 286731 в JavaScript?
let score = 286731;
### Instruction: Как объявить переменную score со значением 286731 в JavaScript? ### Response: let score = 286731;
133,793
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 3741.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3741) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 3741. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3741) << std::endl;
44,273,662
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(); }
96,428,688
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1918 високосным.
public bool IsLeap() { int y = 1918; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1918 високосным. ### Response: public bool IsLeap() { int y = 1918; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,329,483
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 671254 в Unity?
int buffer = 671254;
### Instruction: Как объявить переменную buffer со значением 671254 в Unity? ### Response: int buffer = 671254;
1,365,182
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 781657 в JavaScript?
let total = 781657;
### Instruction: Как объявить переменную total со значением 781657 в JavaScript? ### Response: let total = 781657;
27,114,101
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; }
63,565,203
kk
Java
logic_ops
advanced
Java тилінде 1961 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1961; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1961 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1961; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
55,122,900
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; }
38,719,104
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
33,999,560
kk
Unity
logic_ops
intermediate
Unity тилінде 1969 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1969; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1969 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1969; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
67,787,730
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
61,110,165
kk
Unity
logic_ops
advanced
Unity тилінде 326 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 326; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 326 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 326; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
97,379,056
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; }
52,446,715
en
JavaScript
array_ops
intermediate
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
3,294,924
ru
C#
var_decl
beginner
Как объявить переменную size со значением 866616 в C#?
int size = 866616;
### Instruction: Как объявить переменную size со значением 866616 в C#? ### Response: int size = 866616;
4,117,245
kk
Java
var_decl
beginner
Java тілінде 476531 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 476531;
### Instruction: Java тілінде 476531 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 476531;
94,347,744
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; }
85,281,130
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
27,009,508
kk
Java
logic_ops
advanced
Java тилінде 438 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 438; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 438 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 438; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,866,917
en
Java
var_decl
beginner
How to declare a variable speed with value 232782 in Java?
int speed = 232782;
### Instruction: How to declare a variable speed with value 232782 in Java? ### Response: int speed = 232782;
65,557,956
en
Unity
array_ops
intermediate
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); }
1,116,784
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 3503.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(3503));
### Instruction: Write a function in JavaScript that calculates the factorial of 3503. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(3503));
87,501,965
en
Unity
logic_ops
advanced
Write logic to check if the year 1968 is a leap year in Unity.
public bool IsLeap() { int y = 1968; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1968 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1968; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
18,686,522
kk
Python
logic_ops
advanced
Python тилінде 200 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 200 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 200 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 200 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,362,163
ru
C++
var_decl
beginner
Как объявить переменную data со значением 852468 в C++?
int data = 852468;
### Instruction: Как объявить переменную data со значением 852468 в C++? ### Response: int data = 852468;
56,400,688
en
Python
array_ops
intermediate
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
42,203,115
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,523,764
ru
C#
var_decl
beginner
Как объявить переменную index со значением 847814 в C#?
int index = 847814;
### Instruction: Как объявить переменную index со значением 847814 в C#? ### Response: int index = 847814;
2,038,514
en
C++
var_decl
beginner
How to declare a variable result with value 44214 in C++?
int result = 44214;
### Instruction: How to declare a variable result with value 44214 in C++? ### Response: int result = 44214;
58,338,062
kk
C#
logic_ops
advanced
C# тилінде 2050 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2050; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2050 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2050; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
87,905,509
kk
C++
logic_ops
advanced
C++ тилінде 25 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 25; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 25 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 25; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,981,833
kk
C#
var_decl
beginner
C# тілінде 380184 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 380184;
### Instruction: C# тілінде 380184 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 380184;
3,973,230
en
C#
var_decl
beginner
How to declare a variable speed with value 793264 in C#?
int speed = 793264;
### Instruction: How to declare a variable speed with value 793264 in C#? ### Response: int speed = 793264;
68,662,396
en
Unity
array_ops
intermediate
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; }
27,963,740
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); }
423,803
en
Python
var_decl
beginner
How to declare a variable count with value 166127 in Python?
count = 166127
### Instruction: How to declare a variable count with value 166127 in Python? ### Response: count = 166127
22,613,206
kk
C++
logic_ops
intermediate
C++ тилінде 101 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 101; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 101 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 101; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
81,272,425
ru
C#
string_ops
advanced
Напишите на C# функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C# функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
65,774,296
ru
Java
array_ops
advanced
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
57,501,771
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);
89,526,628
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; }
69,827,927
kk
C++
array_ops
intermediate
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,116,954
kk
Python
factorial
advanced
Python тілінде 5937 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5937))
### Instruction: Python тілінде 5937 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5937))
446,266
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 9697.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9697)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 9697. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9697)); }
2,854,712
en
Python
var_decl
beginner
How to declare a variable amount with value 402945 in Python?
amount = 402945
### Instruction: How to declare a variable amount with value 402945 in Python? ### Response: amount = 402945
60,452,918
kk
C#
logic_ops
advanced
C# тилінде 2058 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2058; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2058 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2058; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
96,375,939
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;
90,649,945
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,532,096
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 840372 в C#?
int buffer = 840372;
### Instruction: Как объявить переменную buffer со значением 840372 в C#? ### Response: int buffer = 840372;
63,133,890
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
744,588
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 5489.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5489)); }
### Instruction: Write a function in Unity that calculates the factorial of 5489. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5489)); }