id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
14,327,477
en
JavaScript
string_ops
advanced
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;
15,191,086
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
44,228,600
en
Java
array_ops
intermediate
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
33,893,532
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 1930 високосным.
public bool IsLeap() { int y = 1930; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1930 високосным. ### Response: public bool IsLeap() { int y = 1930; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,933,868
ru
C++
var_decl
beginner
Как объявить переменную size со значением 887879 в C++?
int size = 887879;
### Instruction: Как объявить переменную size со значением 887879 в C++? ### Response: int size = 887879;
1,374,584
kk
C++
var_decl
beginner
C++ тілінде 439407 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 439407;
### Instruction: C++ тілінде 439407 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 439407;
14,395,691
en
Python
array_ops
advanced
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]
46,718,949
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); }
161,577
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 6046-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(6046) << std::endl;
### Instruction: C++ тілінде 1-ден 6046-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(6046) << std::endl;
544,986
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 2719.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2719));
### Instruction: Write a function in Java that calculates the factorial of 2719. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2719));
47,608,669
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C++ функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
3,760,742
ru
JavaScript
var_decl
beginner
Как объявить переменную amount со значением 381209 в JavaScript?
let amount = 381209;
### Instruction: Как объявить переменную amount со значением 381209 в JavaScript? ### Response: let amount = 381209;
1,004,644
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 6342.
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(6342) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 6342. ### 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(6342) << std::endl;
28,346,871
kk
C++
logic_ops
advanced
C++ тилінде 2038 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2038; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2038 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2038; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
14,283,738
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; }
4,934,620
kk
JavaScript
var_decl
beginner
JavaScript тілінде 883414 мәнімен x айнымалысын қалай жариялауға болады?
let x = 883414;
### Instruction: JavaScript тілінде 883414 мәнімен x айнымалысын қалай жариялауға болады? ### Response: let x = 883414;
3,027,773
kk
Python
var_decl
beginner
Python тілінде 39344 мәнімен amount айнымалысын қалай жариялауға болады?
amount = 39344
### Instruction: Python тілінде 39344 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: amount = 39344
4,504,570
en
C++
var_decl
beginner
How to declare a variable rate with value 638668 in C++?
int rate = 638668;
### Instruction: How to declare a variable rate with value 638668 in C++? ### Response: int rate = 638668;
39,217,884
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); }
187
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 737.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(737) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 737. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(737) << std::endl;
75,510,924
en
C++
logic_ops
intermediate
Write a function that determines if the number 312 is prime in C++.
public bool IsPrime() { int n = 312; 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 312 is prime in C++. ### Response: public bool IsPrime() { int n = 312; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,776,578
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 603195 в Unity?
int buffer = 603195;
### Instruction: Как объявить переменную buffer со значением 603195 в Unity? ### Response: int buffer = 603195;
3,926,350
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 837858 в JavaScript?
let total = 837858;
### Instruction: Как объявить переменную total со значением 837858 в JavaScript? ### Response: let total = 837858;
98,532,566
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
1,558,129
en
JavaScript
var_decl
beginner
How to declare a variable x with value 853438 in JavaScript?
let x = 853438;
### Instruction: How to declare a variable x with value 853438 in JavaScript? ### Response: let x = 853438;
92,721,219
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
4,057,976
kk
Java
var_decl
beginner
Java тілінде 81915 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 81915;
### Instruction: Java тілінде 81915 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 81915;
33,793,391
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
14,294,712
kk
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); }
2,001,765
kk
C++
var_decl
beginner
C++ тілінде 666798 мәнімен x айнымалысын қалай жариялауға болады?
int x = 666798;
### Instruction: C++ тілінде 666798 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 666798;
73,482,850
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; }
1,946,213
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 192050 в JavaScript?
let index = 192050;
### Instruction: Как объявить переменную index со значением 192050 в JavaScript? ### Response: let index = 192050;
843,670
kk
C++
var_decl
beginner
C++ тілінде 312733 мәнімен result айнымалысын қалай жариялауға болады?
int result = 312733;
### Instruction: C++ тілінде 312733 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 312733;
672,832
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 5963.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5963))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 5963. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5963))
93,026,472
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; }
3,177,697
ru
Java
var_decl
beginner
Как объявить переменную speed со значением 981021 в Java?
int speed = 981021;
### Instruction: Как объявить переменную speed со значением 981021 в Java? ### Response: int speed = 981021;
51,226,073
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; }
80,688,994
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 1924 високосным.
public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1924 високосным. ### Response: public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
81,167,256
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); }
95,081,147
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; }
74,234,355
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
65,176,657
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
92,137,196
en
Java
string_ops
advanced
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(); }
4,776,930
en
Unity
var_decl
beginner
How to declare a variable health with value 681791 in Unity?
int health = 681791;
### Instruction: How to declare a variable health with value 681791 in Unity? ### Response: int health = 681791;
34,232,276
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; }
63,658,100
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; }
65,897,799
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 376 простым.
function isPrime() { let n = 376; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 376 простым. ### Response: function isPrime() { let n = 376; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,448,076
en
Python
var_decl
beginner
How to declare a variable buffer with value 605658 in Python?
buffer = 605658
### Instruction: How to declare a variable buffer with value 605658 in Python? ### Response: buffer = 605658
4,191,934
en
C++
var_decl
beginner
How to declare a variable result with value 22252 in C++?
int result = 22252;
### Instruction: How to declare a variable result with value 22252 in C++? ### Response: int result = 22252;
3,451,386
kk
Python
var_decl
beginner
Python тілінде 356972 мәнімен y айнымалысын қалай жариялауға болады?
y = 356972
### Instruction: Python тілінде 356972 мәнімен y айнымалысын қалай жариялауға болады? ### Response: y = 356972
4,148,722
en
Unity
var_decl
beginner
How to declare a variable x with value 805473 in Unity?
int x = 805473;
### Instruction: How to declare a variable x with value 805473 in Unity? ### Response: int x = 805473;
42,828,945
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; }
86,232,955
ru
Python
string_ops
advanced
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
64,228,817
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1999 високосным.
public bool IsLeap() { int y = 1999; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1999 високосным. ### Response: public bool IsLeap() { int y = 1999; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
13,199,932
kk
Java
logic_ops
advanced
Java тилінде 205 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 205; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 205 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 205; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
35,423,111
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; }
79,929,985
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аеёиоуыэюя')
42,486,959
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); }
26,612,630
en
Python
logic_ops
intermediate
Write logic to check if the year 1997 is a leap year in Python.
def is_leap(): year = 1997 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1997 is a leap year in Python. ### Response: def is_leap(): year = 1997 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
17,841,756
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
4,440,155
en
Java
var_decl
beginner
How to declare a variable weight with value 224757 in Java?
int weight = 224757;
### Instruction: How to declare a variable weight with value 224757 in Java? ### Response: int weight = 224757;
67,779,769
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(); }
56,674,529
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]
24,487,354
ru
Unity
logic_ops
advanced
Напишите на Unity функцию, определяющую, является ли число 391 простым.
public bool IsPrime() { int n = 391; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 391 простым. ### Response: public bool IsPrime() { int n = 391; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,633,059
en
Python
var_decl
beginner
How to declare a variable y with value 530427 in Python?
y = 530427
### Instruction: How to declare a variable y with value 530427 in Python? ### Response: y = 530427
438,044
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 679707 в JavaScript?
let index = 679707;
### Instruction: Как объявить переменную index со значением 679707 в JavaScript? ### Response: let index = 679707;
87,704,199
kk
Python
logic_ops
advanced
Python тилінде 305 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 305 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 305 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 305 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
35,123,080
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
863,790
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 783145 in JavaScript?
let offset = 783145;
### Instruction: How to declare a variable offset with value 783145 in JavaScript? ### Response: let offset = 783145;
17,501,266
kk
Java
logic_ops
advanced
Java тилінде 1920 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1920; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1920 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1920; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,256,710
en
Unity
var_decl
beginner
How to declare a variable buffer with value 418660 in Unity?
int buffer = 418660;
### Instruction: How to declare a variable buffer with value 418660 in Unity? ### Response: int buffer = 418660;
78,228,307
en
Java
array_ops
advanced
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; }
35,463,650
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
62,466,600
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1937 is a leap year in JavaScript.
function isLeap() { let y = 1937; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1937 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1937; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
78,037,722
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,393,193
en
C++
var_decl
beginner
How to declare a variable weight with value 106489 in C++?
int weight = 106489;
### Instruction: How to declare a variable weight with value 106489 in C++? ### Response: int weight = 106489;
16,146,345
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C++ функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
25,180,038
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(); }
83,333
kk
Java
sum_n
intermediate
Java тілінде 1-ден 3358-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3358));
### Instruction: Java тілінде 1-ден 3358-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3358));
98,870,560
en
Python
array_ops
advanced
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]
2,336,572
en
C++
var_decl
beginner
How to declare a variable limit with value 812956 in C++?
int limit = 812956;
### Instruction: How to declare a variable limit with value 812956 in C++? ### Response: int limit = 812956;
68,532,580
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
50,802,888
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
96,078,955
en
C#
logic_ops
intermediate
Write logic to check if the year 2081 is a leap year in C#.
public bool IsLeap() { int y = 2081; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2081 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2081; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
13,532,728
en
C++
logic_ops
advanced
Write a function that determines if the number 29 is prime in C++.
public bool IsPrime() { int n = 29; 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 29 is prime in C++. ### Response: public bool IsPrime() { int n = 29; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,338,476
ru
Unity
var_decl
beginner
Как объявить переменную level со значением 306704 в Unity?
int level = 306704;
### Instruction: Как объявить переменную level со значением 306704 в Unity? ### Response: int level = 306704;
823,005
ru
Python
var_decl
beginner
Как объявить переменную offset со значением 902614 в Python?
offset = 902614
### Instruction: Как объявить переменную offset со значением 902614 в Python? ### Response: offset = 902614
16,130,545
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(); }
1,544,179
ru
JavaScript
var_decl
beginner
Как объявить переменную value со значением 196121 в JavaScript?
let value = 196121;
### Instruction: Как объявить переменную value со значением 196121 в JavaScript? ### Response: let value = 196121;
54,526,725
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
77,604,694
en
Java
array_ops
intermediate
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
4,470,865
ru
C#
var_decl
beginner
Как объявить переменную weight со значением 258472 в C#?
int weight = 258472;
### Instruction: Как объявить переменную weight со значением 258472 в C#? ### Response: int weight = 258472;
32,461,160
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
68,369,442
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(); }
45,439,908
en
Unity
logic_ops
intermediate
Write logic to check if the year 2070 is a leap year in Unity.
public bool IsLeap() { int y = 2070; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2070 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2070; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
38,081,865
en
Python
string_ops
intermediate
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]
262,560
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 5191-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5191)); }
### Instruction: Unity тілінде 1-ден 5191-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5191)); }
2,299,303
ru
C++
var_decl
beginner
Как объявить переменную value со значением 813588 в C++?
int value = 813588;
### Instruction: Как объявить переменную value со значением 813588 в C++? ### Response: int value = 813588;
14,557,869
en
Java
string_ops
advanced
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,514,484
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 725872 в C#?
int timer = 725872;
### Instruction: Как объявить переменную timer со значением 725872 в C#? ### Response: int timer = 725872;