id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
511,673
kk
JavaScript
factorial
advanced
JavaScript тілінде 8384 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8384));
### Instruction: JavaScript тілінде 8384 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8384));
61,259,992
en
Python
logic_ops
intermediate
Write logic to check if the year 1942 is a leap year in Python.
def is_leap(): year = 1942 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1942 is a leap year in Python. ### Response: def is_leap(): year = 1942 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
99,884,073
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; }
1,681,549
en
Unity
var_decl
beginner
How to declare a variable result with value 77982 in Unity?
int result = 77982;
### Instruction: How to declare a variable result with value 77982 in Unity? ### Response: int result = 77982;
56,976,338
en
C++
logic_ops
intermediate
Write logic to check if the year 2056 is a leap year in C++.
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 C++. ### Response: public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
10,101,698
en
C#
logic_ops
advanced
Write logic to check if the year 2073 is a leap year in C#.
public bool IsLeap() { int y = 2073; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2073 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2073; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
35,121,325
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; }
84,913,045
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2032 високосным.
public bool IsLeap() { int y = 2032; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2032 високосным. ### Response: public bool IsLeap() { int y = 2032; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
37,840,734
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; }
58,698,436
kk
Python
logic_ops
advanced
Python тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2081 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2081 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
43,885,570
kk
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; }
63,181,677
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 2056 високосным.
public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2056 високосным. ### Response: public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
299,189
en
Java
var_decl
beginner
How to declare a variable data with value 190279 in Java?
int data = 190279;
### Instruction: How to declare a variable data with value 190279 in Java? ### Response: int data = 190279;
2,411,960
en
C#
var_decl
beginner
How to declare a variable result with value 24405 in C#?
int result = 24405;
### Instruction: How to declare a variable result with value 24405 in C#? ### Response: int result = 24405;
25,191,017
en
Python
string_ops
advanced
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
41,197,811
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 310 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 310; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 310 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 310; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
800,430
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 124801 в Unity?
int speed = 124801;
### Instruction: Как объявить переменную speed со значением 124801 в Unity? ### Response: int speed = 124801;
72,299,966
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 229 простым.
public bool IsPrime() { int n = 229; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 229 простым. ### Response: public bool IsPrime() { int n = 229; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
76,179,662
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
2,851,575
kk
C++
var_decl
beginner
C++ тілінде 871139 мәнімен total айнымалысын қалай жариялауға болады?
int total = 871139;
### Instruction: C++ тілінде 871139 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 871139;
17,140,155
en
Java
string_ops
intermediate
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
70,023,897
kk
Java
logic_ops
advanced
Java тилінде 2093 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2093; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2093 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2093; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
17,830,352
kk
C#
logic_ops
advanced
C# тилінде 1952 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1952; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1952 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1952; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
31,060,928
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1987 високосным.
function isLeap() { let y = 1987; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1987 високосным. ### Response: function isLeap() { let y = 1987; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,731,901
en
C++
var_decl
beginner
How to declare a variable rate with value 484204 in C++?
int rate = 484204;
### Instruction: How to declare a variable rate with value 484204 in C++? ### Response: int rate = 484204;
43,645,570
kk
Unity
array_ops
advanced
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
92,848,623
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; }
48,946,990
kk
Python
logic_ops
intermediate
Python тилінде 96 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 96 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 96 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 96 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
4,447,143
en
C#
var_decl
beginner
How to declare a variable buffer with value 201123 in C#?
int buffer = 201123;
### Instruction: How to declare a variable buffer with value 201123 in C#? ### Response: int buffer = 201123;
1,245,592
kk
Java
var_decl
beginner
Java тілінде 130631 мәнімен y айнымалысын қалай жариялауға болады?
int y = 130631;
### Instruction: Java тілінде 130631 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 130631;
1,077,114
en
C#
var_decl
beginner
How to declare a variable x with value 375224 in C#?
int x = 375224;
### Instruction: How to declare a variable x with value 375224 in C#? ### Response: int x = 375224;
1,770,875
ru
Java
var_decl
beginner
Как объявить переменную result со значением 762975 в Java?
int result = 762975;
### Instruction: Как объявить переменную result со значением 762975 в Java? ### Response: int result = 762975;
3,916,672
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 802289 в Unity?
int speed = 802289;
### Instruction: Как объявить переменную speed со значением 802289 в Unity? ### Response: int speed = 802289;
42,635,245
kk
Unity
array_ops
intermediate
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
50,791,142
en
C#
logic_ops
intermediate
Write a function that determines if the number 457 is prime in C#.
public bool IsPrime() { int n = 457; 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 457 is prime in C#. ### Response: public bool IsPrime() { int n = 457; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
28,001,513
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 2046 високосным.
public bool IsLeap() { int y = 2046; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2046 високосным. ### Response: public bool IsLeap() { int y = 2046; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
73,723,121
en
JavaScript
array_ops
advanced
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);
19,793,344
en
Python
logic_ops
advanced
Write logic to check if the year 2078 is a leap year in Python.
def is_leap(): year = 2078 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2078 is a leap year in Python. ### Response: def is_leap(): year = 2078 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
88,834,825
ru
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; }
93,110,217
kk
Python
logic_ops
intermediate
Python тилінде 194 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 194 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 194 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 194 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
62,975,611
en
C++
logic_ops
advanced
Write a function that determines if the number 377 is prime in C++.
public bool IsPrime() { int n = 377; 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 377 is prime in C++. ### Response: public bool IsPrime() { int n = 377; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,375,063
ru
Unity
var_decl
beginner
Как объявить переменную score со значением 737512 в Unity?
int score = 737512;
### Instruction: Как объявить переменную score со значением 737512 в Unity? ### Response: int score = 737512;
1,334,455
en
Python
var_decl
beginner
How to declare a variable rate with value 800021 in Python?
rate = 800021
### Instruction: How to declare a variable rate with value 800021 in Python? ### Response: rate = 800021
95,010,159
kk
Java
string_ops
intermediate
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
21,872,043
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; }
4,959,286
en
C++
var_decl
beginner
How to declare a variable health with value 160240 in C++?
int health = 160240;
### Instruction: How to declare a variable health with value 160240 in C++? ### Response: int health = 160240;
46,562,342
en
Unity
string_ops
intermediate
Write a function that counts vowels in a text in Unity.
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 Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
245,359
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 3705.
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(3705) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 3705. ### 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(3705) << std::endl;
65,863,245
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);
67,849,167
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; }
26,286,895
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 338 простым.
public bool IsPrime() { int n = 338; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 338 простым. ### Response: public bool IsPrime() { int n = 338; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,761,983
en
Unity
var_decl
beginner
How to declare a variable limit with value 510715 in Unity?
int limit = 510715;
### Instruction: How to declare a variable limit with value 510715 in Unity? ### Response: int limit = 510715;
4,565,997
en
JavaScript
var_decl
beginner
How to declare a variable index with value 865188 in JavaScript?
let index = 865188;
### Instruction: How to declare a variable index with value 865188 in JavaScript? ### Response: let index = 865188;
28,616,454
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
96,845,755
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
4,016,942
ru
Unity
var_decl
beginner
Как объявить переменную limit со значением 95844 в Unity?
int limit = 95844;
### Instruction: Как объявить переменную limit со значением 95844 в Unity? ### Response: int limit = 95844;
69,814,981
ru
Java
array_ops
advanced
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
71,020,111
en
C#
string_ops
intermediate
Write a function that converts a string to uppercase in C#.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C#. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
6,654
kk
Python
factorial
advanced
Python тілінде 5527 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5527))
### Instruction: Python тілінде 5527 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5527))
63,328,730
ru
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; }
96,091,160
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(); }
46,976,037
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 1935 високосным.
public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1935 високосным. ### Response: public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,486,036
kk
Python
var_decl
beginner
Python тілінде 433853 мәнімен health айнымалысын қалай жариялауға болады?
health = 433853
### Instruction: Python тілінде 433853 мәнімен health айнымалысын қалай жариялауға болады? ### Response: health = 433853
84,408,772
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 355 простым.
function isPrime() { let n = 355; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 355 простым. ### Response: function isPrime() { let n = 355; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
99,060,594
en
C++
logic_ops
intermediate
Write logic to check if the year 1924 is a leap year in C++.
public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1924 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
74,614,687
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; }
93,573,443
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
2,321,559
kk
JavaScript
var_decl
beginner
JavaScript тілінде 26750 мәнімен amount айнымалысын қалай жариялауға болады?
let amount = 26750;
### Instruction: JavaScript тілінде 26750 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: let amount = 26750;
3,046,067
kk
Python
var_decl
beginner
Python тілінде 741120 мәнімен count айнымалысын қалай жариялауға болады?
count = 741120
### Instruction: Python тілінде 741120 мәнімен count айнымалысын қалай жариялауға болады? ### Response: count = 741120
57,182,703
en
Java
string_ops
intermediate
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
30,739,552
kk
C#
logic_ops
advanced
C# тилінде 2046 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2046; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2046 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2046; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
85,942,832
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; }
68,939,428
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
3,762,957
kk
C++
var_decl
beginner
C++ тілінде 981820 мәнімен size айнымалысын қалай жариялауға болады?
int size = 981820;
### Instruction: C++ тілінде 981820 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 981820;
19,782,845
kk
C#
logic_ops
intermediate
C# тилінде 90 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 90; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 90 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 90; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,089,987
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 577232 в JavaScript?
let index = 577232;
### Instruction: Как объявить переменную index со значением 577232 в JavaScript? ### Response: let index = 577232;
46,262,530
kk
Java
string_ops
advanced
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; }
50,941,460
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 2023 високосным.
public bool IsLeap() { int y = 2023; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2023 високосным. ### Response: public bool IsLeap() { int y = 2023; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
50,221,989
en
Java
array_ops
advanced
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; }
56,705,147
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
57,283,696
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); }
30,647,844
en
Unity
array_ops
intermediate
Write a function that filters only even numbers from a list in Unity.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Unity. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
540,308
kk
C#
sum_n
intermediate
C# тілінде 1-ден 4040-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4040));
### Instruction: C# тілінде 1-ден 4040-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4040));
99,367,102
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
588,407
kk
Java
sum_n
intermediate
Java тілінде 1-ден 9359-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9359));
### Instruction: Java тілінде 1-ден 9359-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9359));
39,581,292
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
127,884
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 6580.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6580))
### Instruction: Write a function in Python that sums numbers from 1 to 6580. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6580))
56,946,934
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
3,668,948
en
C++
var_decl
beginner
How to declare a variable result with value 191335 in C++?
int result = 191335;
### Instruction: How to declare a variable result with value 191335 in C++? ### Response: int result = 191335;
27,568,877
en
C++
string_ops
intermediate
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; }
35,935,569
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
77,698,216
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); }
33,725,372
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1967 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1967; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1967 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1967; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
37,493,351
kk
Unity
logic_ops
intermediate
Unity тилінде 1915 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1915; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1915 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1915; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
73,807,402
en
JavaScript
string_ops
intermediate
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();
4,809,436
kk
JavaScript
var_decl
beginner
JavaScript тілінде 656799 мәнімен result айнымалысын қалай жариялауға болады?
let result = 656799;
### Instruction: JavaScript тілінде 656799 мәнімен result айнымалысын қалай жариялауға болады? ### Response: let result = 656799;
3,387,808
kk
JavaScript
var_decl
beginner
JavaScript тілінде 541959 мәнімен index айнымалысын қалай жариялауға болады?
let index = 541959;
### Instruction: JavaScript тілінде 541959 мәнімен index айнымалысын қалай жариялауға болады? ### Response: let index = 541959;
1,600,259
ru
Java
var_decl
beginner
Как объявить переменную level со значением 167806 в Java?
int level = 167806;
### Instruction: Как объявить переменную level со значением 167806 в Java? ### Response: int level = 167806;
4,462,139
kk
Java
var_decl
beginner
Java тілінде 165622 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 165622;
### Instruction: Java тілінде 165622 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 165622;
93,200,008
kk
Python
string_ops
advanced
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]