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
93,233,816
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(); }
76,707,272
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; }
1,474,847
ru
Java
var_decl
beginner
Как объявить переменную value со значением 546790 в Java?
int value = 546790;
### Instruction: Как объявить переменную value со значением 546790 в Java? ### Response: int value = 546790;
26,660,193
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
365,291
kk
Unity
var_decl
beginner
Unity тілінде 849759 мәнімен score айнымалысын қалай жариялауға болады?
int score = 849759;
### Instruction: Unity тілінде 849759 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 849759;
76,785,798
en
C#
logic_ops
intermediate
Write a function that determines if the number 432 is prime in C#.
public bool IsPrime() { int n = 432; 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 432 is prime in C#. ### Response: public bool IsPrime() { int n = 432; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,706,072
kk
Unity
var_decl
beginner
Unity тілінде 23540 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 23540;
### Instruction: Unity тілінде 23540 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 23540;
14,432,911
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; }
23,571,772
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2017 високосным.
public bool IsLeap() { int y = 2017; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2017 високосным. ### Response: public bool IsLeap() { int y = 2017; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
26,554,842
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(); }
197,078
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 5318.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(5318));
### Instruction: Write a function in Java that calculates the factorial of 5318. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(5318));
26,761,862
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; }
327,743
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 7043.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7043));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 7043. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7043));
31,759,061
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();
59,238,466
kk
Unity
array_ops
advanced
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
14,767,799
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; }
4,140,475
ru
Java
var_decl
beginner
Как объявить переменную size со значением 347696 в Java?
int size = 347696;
### Instruction: Как объявить переменную size со значением 347696 в Java? ### Response: int size = 347696;
90,854,705
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]
26,052
en
Python
var_decl
beginner
How to declare a variable size with value 124284 in Python?
size = 124284
### Instruction: How to declare a variable size with value 124284 in Python? ### Response: size = 124284
68,126,026
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; }
70,467,836
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аеёиоуыэюя')
4,484,106
ru
Java
var_decl
beginner
Как объявить переменную score со значением 914153 в Java?
int score = 914153;
### Instruction: Как объявить переменную score со значением 914153 в Java? ### Response: int score = 914153;
22,669,338
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аеёиоуыэюя')
679,373
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 123715 в C#?
int buffer = 123715;
### Instruction: Как объявить переменную buffer со значением 123715 в C#? ### Response: int buffer = 123715;
4,626,060
kk
C++
var_decl
beginner
C++ тілінде 329368 мәнімен health айнымалысын қалай жариялауға болады?
int health = 329368;
### Instruction: C++ тілінде 329368 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 329368;
319,973
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 2154.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2154)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 2154. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2154)); }
42,860,537
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
2,733,935
kk
C#
var_decl
beginner
C# тілінде 99294 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 99294;
### Instruction: C# тілінде 99294 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 99294;
93,631,516
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('');
79,564,059
kk
Java
logic_ops
intermediate
Java тилінде 2003 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2003; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2003 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2003; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
423,434
kk
C#
sum_n
intermediate
C# тілінде 1-ден 6699-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6699));
### Instruction: C# тілінде 1-ден 6699-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6699));
99,166,976
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
32,963,119
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 119 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 119; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 119 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 119; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
264,574
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 4192.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4192));
### Instruction: Write a function in C# that calculates the factorial of 4192. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4192));
915,100
en
Unity
var_decl
beginner
How to declare a variable buffer with value 962992 in Unity?
int buffer = 962992;
### Instruction: How to declare a variable buffer with value 962992 in Unity? ### Response: int buffer = 962992;
12,104
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 5874.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5874) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 5874. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5874) << std::endl;
38,433,019
en
C++
logic_ops
intermediate
Write logic to check if the year 2041 is a leap year in C++.
public bool IsLeap() { int y = 2041; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2041 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2041; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,038,191
kk
C#
var_decl
beginner
C# тілінде 782222 мәнімен result айнымалысын қалай жариялауға болады?
int result = 782222;
### Instruction: C# тілінде 782222 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 782222;
1,475,794
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 4366.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4366))
### Instruction: Write a function in Python that sums numbers from 1 to 4366. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4366))
1,469,422
kk
Unity
var_decl
beginner
Unity тілінде 210878 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 210878;
### Instruction: Unity тілінде 210878 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 210878;
63,994,861
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(); }
56,128,974
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; }
72,363,749
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
66,285,068
kk
Python
logic_ops
advanced
Python тилінде 157 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 157 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 157 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 157 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
82,081,259
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; }
71,382,573
kk
Unity
array_ops
intermediate
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; }
92,042,984
kk
Python
logic_ops
advanced
Python тилінде 456 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 456 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 456 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 456 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
52,933,143
kk
Python
logic_ops
advanced
Python тилінде 2015 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2015 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2015 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2015 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
81,524,746
en
Java
string_ops
intermediate
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; }
3,310,101
en
C#
var_decl
beginner
How to declare a variable limit with value 71506 in C#?
int limit = 71506;
### Instruction: How to declare a variable limit with value 71506 in C#? ### Response: int limit = 71506;
12,847,355
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1963 високосным.
public bool IsLeap() { int y = 1963; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1963 високосным. ### Response: public bool IsLeap() { int y = 1963; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
86,882,375
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 306 простым.
public bool IsPrime() { int n = 306; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 306 простым. ### Response: public bool IsPrime() { int n = 306; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
60,992,745
kk
C#
logic_ops
intermediate
C# тилінде 174 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 174; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 174 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 174; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,813,014
en
C#
var_decl
beginner
How to declare a variable x with value 126865 in C#?
int x = 126865;
### Instruction: How to declare a variable x with value 126865 in C#? ### Response: int x = 126865;
14,747,135
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);
92,163,727
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]
95,787,817
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; }
27,106,367
kk
Unity
logic_ops
advanced
Unity тилінде 120 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 120; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 120 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 120; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,543,644
en
Python
var_decl
beginner
How to declare a variable total with value 895119 in Python?
total = 895119
### Instruction: How to declare a variable total with value 895119 in Python? ### Response: total = 895119
4,082,741
ru
Unity
var_decl
beginner
Как объявить переменную data со значением 915218 в Unity?
int data = 915218;
### Instruction: Как объявить переменную data со значением 915218 в Unity? ### Response: int data = 915218;
37,503,144
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; }
707,838
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 5310.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5310));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 5310. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5310));
98,403,541
en
Java
string_ops
intermediate
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; }
4,517,355
kk
Java
var_decl
beginner
Java тілінде 91513 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 91513;
### Instruction: Java тілінде 91513 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 91513;
13,407,366
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; }
11,901,184
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; }
97,694,904
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); }
4,160,905
en
Java
var_decl
beginner
How to declare a variable weight with value 318470 in Java?
int weight = 318470;
### Instruction: How to declare a variable weight with value 318470 in Java? ### Response: int weight = 318470;
1,404,268
en
Python
var_decl
beginner
How to declare a variable speed with value 372437 in Python?
speed = 372437
### Instruction: How to declare a variable speed with value 372437 in Python? ### Response: speed = 372437
68,104,563
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 2095 високосным.
public bool IsLeap() { int y = 2095; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2095 високосным. ### Response: public bool IsLeap() { int y = 2095; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
92,569,564
en
C#
logic_ops
advanced
Write logic to check if the year 1966 is a leap year in C#.
public bool IsLeap() { int y = 1966; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1966 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1966; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
64,071,576
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]
95,670,606
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2004 is a leap year in JavaScript.
function isLeap() { let y = 2004; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2004 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2004; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
49,069,190
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]
1,002,862
kk
C++
var_decl
beginner
C++ тілінде 156882 мәнімен data айнымалысын қалай жариялауға болады?
int data = 156882;
### Instruction: C++ тілінде 156882 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 156882;
11,482,086
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
1,868,780
en
C#
var_decl
beginner
How to declare a variable buffer with value 860176 in C#?
int buffer = 860176;
### Instruction: How to declare a variable buffer with value 860176 in C#? ### Response: int buffer = 860176;
4,555,703
kk
Unity
var_decl
beginner
Unity тілінде 503980 мәнімен data айнымалысын қалай жариялауға болады?
int data = 503980;
### Instruction: Unity тілінде 503980 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 503980;
76,191
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 5681.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(5681));
### Instruction: Write a function in Java that calculates the factorial of 5681. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(5681));
48,261,727
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 145 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 145; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 145 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 145; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
68,951,195
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,895,994
kk
Java
var_decl
beginner
Java тілінде 440699 мәнімен result айнымалысын қалай жариялауға болады?
int result = 440699;
### Instruction: Java тілінде 440699 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 440699;
36,530,673
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,673,445
en
C#
var_decl
beginner
How to declare a variable index with value 598116 in C#?
int index = 598116;
### Instruction: How to declare a variable index with value 598116 in C#? ### Response: int index = 598116;
220,952
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 6860.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6860) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 6860. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6860) << std::endl;
73,127,757
kk
Unity
logic_ops
advanced
Unity тилінде 127 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 127 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
35,297,429
en
C#
logic_ops
intermediate
Write a function that determines if the number 327 is prime in C#.
public bool IsPrime() { int n = 327; 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 327 is prime in C#. ### Response: public bool IsPrime() { int n = 327; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
761,113
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 8754.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8754)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 8754. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8754)); }
20,242,160
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; }
82,625,316
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(); }
27,728,599
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 187 is prime in JavaScript.
function isPrime() { let n = 187; 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 187 is prime in JavaScript. ### Response: function isPrime() { let n = 187; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
1,099,647
en
JavaScript
var_decl
beginner
How to declare a variable index with value 11950 in JavaScript?
let index = 11950;
### Instruction: How to declare a variable index with value 11950 in JavaScript? ### Response: let index = 11950;
12,232,978
kk
C#
logic_ops
advanced
C# тилінде 137 санының жай сан екенін анықтайтын функцияны жазыңыз.
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: C# тилінде 137 санының жай сан екенін анықтайтын функцияны жазыңыз. ### 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; }
30,209,381
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 118 простым.
def is_prime(): n = 118 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 118 простым. ### Response: def is_prime(): n = 118 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
2,643,280
kk
Unity
var_decl
beginner
Unity тілінде 834544 мәнімен x айнымалысын қалай жариялауға болады?
int x = 834544;
### Instruction: Unity тілінде 834544 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 834544;
10,801,069
ru
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аеёиоуыэюя')
3,691,627
en
Python
var_decl
beginner
How to declare a variable buffer with value 603380 in Python?
buffer = 603380
### Instruction: How to declare a variable buffer with value 603380 in Python? ### Response: buffer = 603380
85,029,131
kk
Unity
string_ops
intermediate
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
11,669,838
en
Java
logic_ops
advanced
Write logic to check if the year 2056 is a leap year in Java.
public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2056 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
26,391,406
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); }