id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
16,918,921
en
Java
logic_ops
intermediate
Write logic to check if the year 1985 is a leap year in Java.
public bool IsLeap() { int y = 1985; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1985 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1985; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,859,376
ru
Python
var_decl
beginner
Как объявить переменную level со значением 69753 в Python?
level = 69753
### Instruction: Как объявить переменную level со значением 69753 в Python? ### Response: level = 69753
583,022
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 3961.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3961));
### Instruction: Write a function in Java that calculates the factorial of 3961. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3961));
38,335,037
en
JavaScript
array_ops
advanced
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
89,789,152
kk
Java
array_ops
advanced
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
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: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### 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; }
62,590,683
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
51,451
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 9048.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9048)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 9048. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9048)); }
62,418,592
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(); }
81,078,200
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]
3,482,137
en
Python
var_decl
beginner
How to declare a variable count with value 328251 in Python?
count = 328251
### Instruction: How to declare a variable count with value 328251 in Python? ### Response: count = 328251
1,106,281
en
Python
var_decl
beginner
How to declare a variable data with value 429627 in Python?
data = 429627
### Instruction: How to declare a variable data with value 429627 in Python? ### Response: data = 429627
65,039,836
kk
Unity
string_ops
advanced
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
77,827,745
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; }
21,015,112
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 48 простым.
public bool IsPrime() { int n = 48; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 48 простым. ### Response: public bool IsPrime() { int n = 48; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,250,680
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 314856 в JavaScript?
let data = 314856;
### Instruction: Как объявить переменную data со значением 314856 в JavaScript? ### Response: let data = 314856;
1,837,143
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 978192 в JavaScript?
let total = 978192;
### Instruction: Как объявить переменную total со значением 978192 в JavaScript? ### Response: let total = 978192;
47,712,627
kk
C#
string_ops
intermediate
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,010,930
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 282549 in JavaScript?
let limit = 282549;
### Instruction: How to declare a variable limit with value 282549 in JavaScript? ### Response: let limit = 282549;
68,138,961
ru
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; }
1,726,555
en
JavaScript
var_decl
beginner
How to declare a variable timer with value 538897 in JavaScript?
let timer = 538897;
### Instruction: How to declare a variable timer with value 538897 in JavaScript? ### Response: let timer = 538897;
1,145,810
kk
JavaScript
var_decl
beginner
JavaScript тілінде 52414 мәнімен health айнымалысын қалай жариялауға болады?
let health = 52414;
### Instruction: JavaScript тілінде 52414 мәнімен health айнымалысын қалай жариялауға болады? ### Response: let health = 52414;
43,259,528
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
77,280,410
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 423 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 423; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 423 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 423; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,593,966
ru
C#
var_decl
beginner
Как объявить переменную count со значением 25793 в C#?
int count = 25793;
### Instruction: Как объявить переменную count со значением 25793 в C#? ### Response: int count = 25793;
58,340,086
en
Python
logic_ops
intermediate
Write logic to check if the year 1956 is a leap year in Python.
def is_leap(): year = 1956 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1956 is a leap year in Python. ### Response: def is_leap(): year = 1956 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
40,423,122
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; }
4,552,575
ru
C#
var_decl
beginner
Как объявить переменную limit со значением 61269 в C#?
int limit = 61269;
### Instruction: Как объявить переменную limit со значением 61269 в C#? ### Response: int limit = 61269;
1,058,287
en
JavaScript
var_decl
beginner
How to declare a variable size with value 357922 in JavaScript?
let size = 357922;
### Instruction: How to declare a variable size with value 357922 in JavaScript? ### Response: let size = 357922;
90,249,945
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 213 простым.
function isPrime() { let n = 213; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 213 простым. ### Response: function isPrime() { let n = 213; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,779,526
en
Java
var_decl
beginner
How to declare a variable level with value 406080 in Java?
int level = 406080;
### Instruction: How to declare a variable level with value 406080 in Java? ### Response: int level = 406080;
50,891,362
en
Java
string_ops
advanced
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
15,688,850
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]
3,119,358
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 350722 в JavaScript?
let data = 350722;
### Instruction: Как объявить переменную data со значением 350722 в JavaScript? ### Response: let data = 350722;
1,413,263
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 5245.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5245));
### Instruction: Write a function in JavaScript that calculates the factorial of 5245. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5245));
190,835
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 8304.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8304) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 8304. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8304) << std::endl;
1,069,889
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 1001-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1001));
### Instruction: JavaScript тілінде 1-ден 1001-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1001));
40,647,637
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
37,403,695
en
Python
array_ops
intermediate
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
889,554
kk
JavaScript
var_decl
beginner
JavaScript тілінде 62032 мәнімен count айнымалысын қалай жариялауға болады?
let count = 62032;
### Instruction: JavaScript тілінде 62032 мәнімен count айнымалысын қалай жариялауға болады? ### Response: let count = 62032;
28,749,548
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; }
87,914,640
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
4,440,117
en
JavaScript
var_decl
beginner
How to declare a variable data with value 28443 in JavaScript?
let data = 28443;
### Instruction: How to declare a variable data with value 28443 in JavaScript? ### Response: let data = 28443;
3,837,748
ru
C#
var_decl
beginner
Как объявить переменную amount со значением 269448 в C#?
int amount = 269448;
### Instruction: Как объявить переменную amount со значением 269448 в C#? ### Response: int amount = 269448;
682,498
kk
C#
factorial
advanced
C# тілінде 1390 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(1390));
### Instruction: C# тілінде 1390 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(1390));
726,077
en
Python
var_decl
beginner
How to declare a variable weight with value 847227 in Python?
weight = 847227
### Instruction: How to declare a variable weight with value 847227 in Python? ### Response: weight = 847227
55,179,755
en
C++
array_ops
intermediate
Write a function that finds the maximum number in an array in C++.
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 C++. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
88,342,117
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
3,341,857
ru
C++
var_decl
beginner
Как объявить переменную count со значением 871831 в C++?
int count = 871831;
### Instruction: Как объявить переменную count со значением 871831 в C++? ### Response: int count = 871831;
65,266,303
kk
C#
string_ops
intermediate
C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
13,251,591
kk
Java
string_ops
intermediate
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
29,806,409
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 114 простым.
public bool IsPrime() { int n = 114; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 114 простым. ### Response: public bool IsPrime() { int n = 114; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,924,532
kk
Unity
var_decl
beginner
Unity тілінде 667991 мәнімен level айнымалысын қалай жариялауға болады?
int level = 667991;
### Instruction: Unity тілінде 667991 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 667991;
54,215,671
kk
Unity
logic_ops
intermediate
Unity тилінде 226 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 226; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 226 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 226; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
48,565,592
kk
Java
logic_ops
advanced
Java тилінде 57 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 57; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 57 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 57; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
26,156,687
en
Java
array_ops
intermediate
Write a function that finds the maximum number in an array in Java.
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 Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,435,176
kk
C++
var_decl
beginner
C++ тілінде 686609 мәнімен value айнымалысын қалай жариялауға болады?
int value = 686609;
### Instruction: C++ тілінде 686609 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 686609;
2,118,049
kk
Python
var_decl
beginner
Python тілінде 222860 мәнімен value айнымалысын қалай жариялауға болады?
value = 222860
### Instruction: Python тілінде 222860 мәнімен value айнымалысын қалай жариялауға болады? ### Response: value = 222860
18,699
kk
JavaScript
factorial
advanced
JavaScript тілінде 2811 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2811));
### Instruction: JavaScript тілінде 2811 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2811));
53,881,154
en
C++
array_ops
advanced
Write a function that finds the maximum number in an array in C++.
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 C++. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
253,265
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 2888-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2888)); }
### Instruction: Unity тілінде 1-ден 2888-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2888)); }
1,318,295
kk
C#
var_decl
beginner
C# тілінде 827477 мәнімен y айнымалысын қалай жариялауға болады?
int y = 827477;
### Instruction: C# тілінде 827477 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 827477;
40,373,063
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C# функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
26,191,238
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; }
49,404,920
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(); }
37,666,873
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 10 простым.
public bool IsPrime() { int n = 10; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 10 простым. ### Response: public bool IsPrime() { int n = 10; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
17,717
kk
C#
factorial
advanced
C# тілінде 2691 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2691));
### Instruction: C# тілінде 2691 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2691));
2,476,450
ru
C#
var_decl
beginner
Как объявить переменную y со значением 312479 в C#?
int y = 312479;
### Instruction: Как объявить переменную y со значением 312479 в C#? ### Response: int y = 312479;
1,189,011
kk
Python
sum_n
intermediate
Python тілінде 1-ден 6669-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6669))
### Instruction: Python тілінде 1-ден 6669-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6669))
49,068,641
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; }
25,663,290
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; }
4,733,035
en
C++
var_decl
beginner
How to declare a variable y with value 28728 in C++?
int y = 28728;
### Instruction: How to declare a variable y with value 28728 in C++? ### Response: int y = 28728;
15,014,798
en
C#
logic_ops
advanced
Write logic to check if the year 1996 is a leap year in C#.
public bool IsLeap() { int y = 1996; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1996 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1996; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,619,758
kk
Unity
var_decl
beginner
Unity тілінде 378100 мәнімен size айнымалысын қалай жариялауға болады?
int size = 378100;
### Instruction: Unity тілінде 378100 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 378100;
64,594,798
kk
Python
logic_ops
intermediate
Python тилінде 1954 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1954 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1954 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1954 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
10,883,975
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); }
50,857,612
en
C++
array_ops
advanced
Write a function that reverses a list in C++.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C++. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
314,909
en
C++
var_decl
beginner
How to declare a variable value with value 507296 in C++?
int value = 507296;
### Instruction: How to declare a variable value with value 507296 in C++? ### Response: int value = 507296;
76,132,107
kk
C++
logic_ops
intermediate
C++ тилінде 2099 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2099; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2099 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2099; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,073,558
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 329972 в Unity?
int result = 329972;
### Instruction: Как объявить переменную result со значением 329972 в Unity? ### Response: int result = 329972;
45,759,187
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; }
37,146,475
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; }
33,031,418
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; }
2,974,881
kk
C#
var_decl
beginner
C# тілінде 665753 мәнімен data айнымалысын қалай жариялауға болады?
int data = 665753;
### Instruction: C# тілінде 665753 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 665753;
95,394,021
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 110 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 110; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 110 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 110; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
1,916,947
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 664878 в Unity?
int result = 664878;
### Instruction: Как объявить переменную result со значением 664878 в Unity? ### Response: int result = 664878;
74,183,304
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
1,050,061
kk
Java
var_decl
beginner
Java тілінде 730778 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 730778;
### Instruction: Java тілінде 730778 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 730778;
3,119,199
ru
Python
var_decl
beginner
Как объявить переменную speed со значением 552757 в Python?
speed = 552757
### Instruction: Как объявить переменную speed со значением 552757 в Python? ### Response: speed = 552757
21,555,143
kk
Java
string_ops
advanced
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; }
489,980
kk
Java
factorial
advanced
Java тілінде 5782 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(5782));
### Instruction: Java тілінде 5782 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(5782));
27,803,816
en
C++
logic_ops
intermediate
Write a function that determines if the number 137 is prime in C++.
public bool IsPrime() { int n = 137; 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 137 is prime in C++. ### Response: public bool IsPrime() { int n = 137; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
75,965,037
en
C#
logic_ops
advanced
Write logic to check if the year 1976 is a leap year in C#.
public bool IsLeap() { int y = 1976; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1976 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1976; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
41,005,710
en
C++
logic_ops
advanced
Write a function that determines if the number 357 is prime in C++.
public bool IsPrime() { int n = 357; 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 357 is prime in C++. ### Response: public bool IsPrime() { int n = 357; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,498,922
kk
C#
var_decl
beginner
C# тілінде 273819 мәнімен data айнымалысын қалай жариялауға болады?
int data = 273819;
### Instruction: C# тілінде 273819 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 273819;
2,629,790
kk
C++
var_decl
beginner
C++ тілінде 403926 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 403926;
### Instruction: C++ тілінде 403926 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 403926;
11,502,303
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; }
84,211,694
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,823,799
ru
C++
var_decl
beginner
Как объявить переменную limit со значением 811931 в C++?
int limit = 811931;
### Instruction: Как объявить переменную limit со значением 811931 в C++? ### Response: int limit = 811931;
82,107,311
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
3,558,869
ru
JavaScript
var_decl
beginner
Как объявить переменную weight со значением 360398 в JavaScript?
let weight = 360398;
### Instruction: Как объявить переменную weight со значением 360398 в JavaScript? ### Response: let weight = 360398;