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
42,861,059
en
Python
string_ops
intermediate
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
45,466,877
en
Python
string_ops
advanced
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
27,187,476
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; }
4,731,936
kk
JavaScript
var_decl
beginner
JavaScript тілінде 184409 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 184409;
### Instruction: JavaScript тілінде 184409 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 184409;
17,671,879
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; }
79,294,748
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(); }
3,827,980
kk
Python
var_decl
beginner
Python тілінде 58372 мәнімен weight айнымалысын қалай жариялауға болады?
weight = 58372
### Instruction: Python тілінде 58372 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: weight = 58372
48,554,898
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2066 високосным.
public bool IsLeap() { int y = 2066; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2066 високосным. ### Response: public bool IsLeap() { int y = 2066; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
31,923,116
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
90,333,303
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Java функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
25,030,261
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; }
62,036,685
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; }
27,608,275
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(); }
72,897,635
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
74,317,523
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
64,462,328
en
Unity
array_ops
advanced
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,826,649
ru
Python
var_decl
beginner
Как объявить переменную speed со значением 303321 в Python?
speed = 303321
### Instruction: Как объявить переменную speed со значением 303321 в Python? ### Response: speed = 303321
63,918,073
en
Python
string_ops
advanced
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
55,089,918
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,522,848
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2045 високосным.
def is_leap(): year = 2045 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2045 високосным. ### Response: def is_leap(): year = 2045 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
371,582
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 1465.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1465));
### Instruction: Write a function in C# that sums numbers from 1 to 1465. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1465));
85,741,705
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 60 is prime in JavaScript.
function isPrime() { let n = 60; 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 60 is prime in JavaScript. ### Response: function isPrime() { let n = 60; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
63,151,137
kk
Java
array_ops
advanced
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
649,090
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 669.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(669));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 669. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(669));
94,364,407
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; }
31,790,223
kk
C++
string_ops
intermediate
C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
297,078
ru
C#
var_decl
beginner
Как объявить переменную data со значением 662838 в C#?
int data = 662838;
### Instruction: Как объявить переменную data со значением 662838 в C#? ### Response: int data = 662838;
178,784
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 7964.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7964))
### Instruction: Write a function in Python that calculates the factorial of 7964. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7964))
4,105,322
en
Python
var_decl
beginner
How to declare a variable rate with value 545801 in Python?
rate = 545801
### Instruction: How to declare a variable rate with value 545801 in Python? ### Response: rate = 545801
4,837,577
en
Java
var_decl
beginner
How to declare a variable result with value 639513 in Java?
int result = 639513;
### Instruction: How to declare a variable result with value 639513 in Java? ### Response: int result = 639513;
199,239
kk
C++
var_decl
beginner
C++ тілінде 813034 мәнімен index айнымалысын қалай жариялауға болады?
int index = 813034;
### Instruction: C++ тілінде 813034 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 813034;
1,560,238
kk
Java
var_decl
beginner
Java тілінде 479986 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 479986;
### Instruction: Java тілінде 479986 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 479986;
81,199,671
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; }
70,547,196
en
JavaScript
string_ops
advanced
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
2,009,558
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 760357 в Unity?
int result = 760357;
### Instruction: Как объявить переменную result со значением 760357 в Unity? ### Response: int result = 760357;
38,405,589
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; }
96,104,111
en
JavaScript
string_ops
intermediate
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
74,306,310
ru
Java
array_ops
intermediate
Напишите на 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; }
39,184,143
kk
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; }
2,304,932
kk
C++
var_decl
beginner
C++ тілінде 72896 мәнімен result айнымалысын қалай жариялауға болады?
int result = 72896;
### Instruction: C++ тілінде 72896 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 72896;
61,316,464
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2098 високосным.
public bool IsLeap() { int y = 2098; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2098 високосным. ### Response: public bool IsLeap() { int y = 2098; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
23,586,279
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; }
4,679,606
en
JavaScript
var_decl
beginner
How to declare a variable value with value 174270 in JavaScript?
let value = 174270;
### Instruction: How to declare a variable value with value 174270 in JavaScript? ### Response: let value = 174270;
4,931,692
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 456525 в Unity?
int buffer = 456525;
### Instruction: Как объявить переменную buffer со значением 456525 в Unity? ### Response: int buffer = 456525;
67,979,207
en
Python
string_ops
advanced
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
24,477,364
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
80,233,927
kk
Java
string_ops
advanced
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,125,604
ru
Unity
var_decl
beginner
Как объявить переменную y со значением 563162 в Unity?
int y = 563162;
### Instruction: Как объявить переменную y со значением 563162 в Unity? ### Response: int y = 563162;
4,648,703
kk
Python
var_decl
beginner
Python тілінде 33507 мәнімен rate айнымалысын қалай жариялауға болады?
rate = 33507
### Instruction: Python тілінде 33507 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: rate = 33507
1,900,895
en
C#
var_decl
beginner
How to declare a variable count with value 455822 in C#?
int count = 455822;
### Instruction: How to declare a variable count with value 455822 in C#? ### Response: int count = 455822;
30,770,008
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1975 високосным.
function isLeap() { let y = 1975; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1975 високосным. ### Response: function isLeap() { let y = 1975; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,125,594
ru
Java
var_decl
beginner
Как объявить переменную weight со значением 735834 в Java?
int weight = 735834;
### Instruction: Как объявить переменную weight со значением 735834 в Java? ### Response: int weight = 735834;
71,159
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 8567-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(8567) << std::endl;
### Instruction: C++ тілінде 1-ден 8567-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(8567) << std::endl;
20,430,091
ru
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); }
76,366,898
ru
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,923,729
ru
Unity
var_decl
beginner
Как объявить переменную offset со значением 97138 в Unity?
int offset = 97138;
### Instruction: Как объявить переменную offset со значением 97138 в Unity? ### Response: int offset = 97138;
24,187,577
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); }
4,960,590
en
C#
var_decl
beginner
How to declare a variable speed with value 977897 in C#?
int speed = 977897;
### Instruction: How to declare a variable speed with value 977897 in C#? ### Response: int speed = 977897;
2,638,989
en
Unity
var_decl
beginner
How to declare a variable value with value 490816 in Unity?
int value = 490816;
### Instruction: How to declare a variable value with value 490816 in Unity? ### Response: int value = 490816;
3,274,587
en
Java
var_decl
beginner
How to declare a variable timer with value 422118 in Java?
int timer = 422118;
### Instruction: How to declare a variable timer with value 422118 in Java? ### Response: int timer = 422118;
69,471,597
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; }
3,267,166
en
Unity
var_decl
beginner
How to declare a variable rate with value 962113 in Unity?
int rate = 962113;
### Instruction: How to declare a variable rate with value 962113 in Unity? ### Response: int rate = 962113;
52,841,697
kk
Python
string_ops
advanced
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
38,544,305
kk
C++
logic_ops
advanced
C++ тилінде 2001 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2001; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2001 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2001; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
85,326,113
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; }
17,398,666
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
69,455,244
ru
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); }
58,206,867
en
C++
logic_ops
intermediate
Write logic to check if the year 2048 is a leap year in C++.
public bool IsLeap() { int y = 2048; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2048 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2048; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
87,043,114
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 272 is prime in JavaScript.
function isPrime() { let n = 272; 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 272 is prime in JavaScript. ### Response: function isPrime() { let n = 272; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
39,208,963
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
55,454,381
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
75,733,079
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
90,106,531
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
1,277,505
ru
Java
var_decl
beginner
Как объявить переменную total со значением 724490 в Java?
int total = 724490;
### Instruction: Как объявить переменную total со значением 724490 в Java? ### Response: int total = 724490;
217,712
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 168.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(168));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 168. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(168));
60,135,415
en
JavaScript
string_ops
intermediate
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
2,056,170
ru
Unity
var_decl
beginner
Как объявить переменную rate со значением 257387 в Unity?
int rate = 257387;
### Instruction: Как объявить переменную rate со значением 257387 в Unity? ### Response: int rate = 257387;
3,503,234
kk
Java
var_decl
beginner
Java тілінде 154671 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 154671;
### Instruction: Java тілінде 154671 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 154671;
2,877,011
ru
C++
var_decl
beginner
Как объявить переменную timer со значением 66876 в C++?
int timer = 66876;
### Instruction: Как объявить переменную timer со значением 66876 в C++? ### Response: int timer = 66876;
38,755,143
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; }
169,329
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 3763.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3763));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 3763. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3763));
41,464,076
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,597,566
kk
Java
var_decl
beginner
Java тілінде 883603 мәнімен health айнымалысын қалай жариялауға болады?
int health = 883603;
### Instruction: Java тілінде 883603 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 883603;
57,462,662
kk
C++
logic_ops
intermediate
C++ тилінде 1983 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1983; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1983 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1983; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,546,156
ru
C++
var_decl
beginner
Как объявить переменную total со значением 174019 в C++?
int total = 174019;
### Instruction: Как объявить переменную total со значением 174019 в C++? ### Response: int total = 174019;
573,899
ru
C#
var_decl
beginner
Как объявить переменную x со значением 343992 в C#?
int x = 343992;
### Instruction: Как объявить переменную x со значением 343992 в C#? ### Response: int x = 343992;
324,041
kk
Python
factorial
advanced
Python тілінде 429 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(429))
### Instruction: Python тілінде 429 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(429))
87,181,878
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
437,719
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 3579-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3579)); }
### Instruction: Unity тілінде 1-ден 3579-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3579)); }
4,552,187
kk
Java
var_decl
beginner
Java тілінде 131072 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 131072;
### Instruction: Java тілінде 131072 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 131072;
90,963,350
en
Unity
logic_ops
advanced
Write a function that determines if the number 93 is prime in Unity.
public bool IsPrime() { int n = 93; 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 93 is prime in Unity. ### Response: public bool IsPrime() { int n = 93; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
36,949,957
en
JavaScript
array_ops
intermediate
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
62,270,250
kk
Python
string_ops
intermediate
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
24,023,630
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 352 простым.
def is_prime(): n = 352 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 352 простым. ### Response: def is_prime(): n = 352 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
32,848,327
en
JavaScript
logic_ops
advanced
Write logic to check if the year 2086 is a leap year in JavaScript.
function isLeap() { let y = 2086; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2086 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2086; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,039,379
kk
Java
var_decl
beginner
Java тілінде 765219 мәнімен x айнымалысын қалай жариялауға болады?
int x = 765219;
### Instruction: Java тілінде 765219 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 765219;
84,533,322
en
Java
logic_ops
intermediate
Write a function that determines if the number 163 is prime in Java.
public bool IsPrime() { int n = 163; 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 163 is prime in Java. ### Response: public bool IsPrime() { int n = 163; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
97,901,370
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; }
406,086
en
Python
var_decl
beginner
How to declare a variable level with value 720302 in Python?
level = 720302
### Instruction: How to declare a variable level with value 720302 in Python? ### Response: level = 720302
90,873,785
en
JavaScript
string_ops
advanced
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();