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
52,346,165
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; }
18,701,630
en
C++
array_ops
advanced
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
39,463,356
en
Python
logic_ops
intermediate
Write logic to check if the year 1996 is a leap year in Python.
def is_leap(): year = 1996 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1996 is a leap year in Python. ### Response: def is_leap(): year = 1996 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
61,426,623
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(); }
700,654
en
C++
var_decl
beginner
How to declare a variable health with value 694381 in C++?
int health = 694381;
### Instruction: How to declare a variable health with value 694381 in C++? ### Response: int health = 694381;
2,687,633
en
JavaScript
var_decl
beginner
How to declare a variable value with value 57570 in JavaScript?
let value = 57570;
### Instruction: How to declare a variable value with value 57570 in JavaScript? ### Response: let value = 57570;
89,355,264
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;
77,213,824
en
JavaScript
string_ops
advanced
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
2,723,044
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 833083 в JavaScript?
let y = 833083;
### Instruction: Как объявить переменную y со значением 833083 в JavaScript? ### Response: let y = 833083;
74,979,972
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; }
34,017,072
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 171 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 171; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 171 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 171; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
58,118,683
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; }
1,791,328
kk
Python
var_decl
beginner
Python тілінде 221703 мәнімен weight айнымалысын қалай жариялауға болады?
weight = 221703
### Instruction: Python тілінде 221703 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: weight = 221703
36,533,163
en
C++
logic_ops
advanced
Write a function that determines if the number 40 is prime in C++.
public bool IsPrime() { int n = 40; 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 40 is prime in C++. ### Response: public bool IsPrime() { int n = 40; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
73,710,178
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
4,436,926
kk
JavaScript
var_decl
beginner
JavaScript тілінде 252692 мәнімен total айнымалысын қалай жариялауға болады?
let total = 252692;
### Instruction: JavaScript тілінде 252692 мәнімен total айнымалысын қалай жариялауға болады? ### Response: let total = 252692;
2,754,970
kk
Java
var_decl
beginner
Java тілінде 934059 мәнімен count айнымалысын қалай жариялауға болады?
int count = 934059;
### Instruction: Java тілінде 934059 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 934059;
4,213,814
kk
C#
var_decl
beginner
C# тілінде 450199 мәнімен level айнымалысын қалай жариялауға болады?
int level = 450199;
### Instruction: C# тілінде 450199 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 450199;
2,211,518
ru
C++
var_decl
beginner
Как объявить переменную value со значением 254969 в C++?
int value = 254969;
### Instruction: Как объявить переменную value со значением 254969 в C++? ### Response: int value = 254969;
18,590,965
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; }
94,534,631
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
21,802,180
kk
C++
logic_ops
advanced
C++ тилінде 1935 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1935 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
755,492
kk
Python
factorial
advanced
Python тілінде 7012 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7012))
### Instruction: Python тілінде 7012 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7012))
51,947,090
ru
C#
string_ops
advanced
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
18,583,174
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; }
4,323,594
kk
C++
var_decl
beginner
C++ тілінде 230654 мәнімен level айнымалысын қалай жариялауға болады?
int level = 230654;
### Instruction: C++ тілінде 230654 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 230654;
14,046,082
en
C#
logic_ops
intermediate
Write a function that determines if the number 46 is prime in C#.
public bool IsPrime() { int n = 46; 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 46 is prime in C#. ### Response: public bool IsPrime() { int n = 46; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
20,167,930
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аеёиоуыэюя')
2,549,722
en
JavaScript
var_decl
beginner
How to declare a variable result with value 282929 in JavaScript?
let result = 282929;
### Instruction: How to declare a variable result with value 282929 in JavaScript? ### Response: let result = 282929;
583,486
ru
Python
var_decl
beginner
Как объявить переменную value со значением 329004 в Python?
value = 329004
### Instruction: Как объявить переменную value со значением 329004 в Python? ### Response: value = 329004
22,962,004
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 385 простым.
public bool IsPrime() { int n = 385; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 385 простым. ### Response: public bool IsPrime() { int n = 385; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
93,117,852
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аеёиоуыэюя')
2,828,134
kk
C#
var_decl
beginner
C# тілінде 660871 мәнімен data айнымалысын қалай жариялауға болады?
int data = 660871;
### Instruction: C# тілінде 660871 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 660871;
87,550,917
ru
Java
string_ops
advanced
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Java функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
12,408,861
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 387 простым.
public bool IsPrime() { int n = 387; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 387 простым. ### Response: public bool IsPrime() { int n = 387; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
69,715,636
en
C#
string_ops
advanced
Write a function that converts a string to uppercase in C#.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C#. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
94,121,226
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; }
870,365
kk
Java
sum_n
intermediate
Java тілінде 1-ден 2983-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2983));
### Instruction: Java тілінде 1-ден 2983-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2983));
11,119,514
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
82,796,428
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();
2,132,226
ru
Python
var_decl
beginner
Как объявить переменную score со значением 345095 в Python?
score = 345095
### Instruction: Как объявить переменную score со значением 345095 в Python? ### Response: score = 345095
4,010,825
ru
C#
var_decl
beginner
Как объявить переменную count со значением 689493 в C#?
int count = 689493;
### Instruction: Как объявить переменную count со значением 689493 в C#? ### Response: int count = 689493;
1,375,681
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 310218 в C++?
int buffer = 310218;
### Instruction: Как объявить переменную buffer со значением 310218 в C++? ### Response: int buffer = 310218;
2,899,851
kk
Python
var_decl
beginner
Python тілінде 515725 мәнімен health айнымалысын қалай жариялауға болады?
health = 515725
### Instruction: Python тілінде 515725 мәнімен health айнымалысын қалай жариялауға болады? ### Response: health = 515725
54,019,920
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1900 високосным.
public bool IsLeap() { int y = 1900; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1900 високосным. ### Response: public bool IsLeap() { int y = 1900; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,204,953
en
JavaScript
var_decl
beginner
How to declare a variable index with value 873742 in JavaScript?
let index = 873742;
### Instruction: How to declare a variable index with value 873742 in JavaScript? ### Response: let index = 873742;
431,534
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 4957-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4957)); }
### Instruction: Unity тілінде 1-ден 4957-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4957)); }
70,856,487
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
2,384,950
ru
Unity
var_decl
beginner
Как объявить переменную y со значением 671588 в Unity?
int y = 671588;
### Instruction: Как объявить переменную y со значением 671588 в Unity? ### Response: int y = 671588;
13,451,778
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]
2,829,854
kk
Java
var_decl
beginner
Java тілінде 702808 мәнімен score айнымалысын қалай жариялауға болады?
int score = 702808;
### Instruction: Java тілінде 702808 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 702808;
15,600,671
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; }
52,152,535
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
188,845
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 9558.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9558));
### Instruction: Write a function in Java that sums numbers from 1 to 9558. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9558));
29,715,598
kk
C#
logic_ops
advanced
C# тилінде 494 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 494; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 494 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 494; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,798,914
kk
Java
var_decl
beginner
Java тілінде 712766 мәнімен value айнымалысын қалай жариялауға болады?
int value = 712766;
### Instruction: Java тілінде 712766 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 712766;
2,046,598
kk
C#
var_decl
beginner
C# тілінде 363450 мәнімен total айнымалысын қалай жариялауға болады?
int total = 363450;
### Instruction: C# тілінде 363450 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 363450;
4,060,683
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 646110 в Unity?
int buffer = 646110;
### Instruction: Как объявить переменную buffer со значением 646110 в Unity? ### Response: int buffer = 646110;
73,070,090
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аеёиоуыэюя')
67,579,185
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 2006 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2006; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2006 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2006; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,582,031
kk
C#
var_decl
beginner
C# тілінде 911499 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 911499;
### Instruction: C# тілінде 911499 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 911499;
4,458,155
en
Java
var_decl
beginner
How to declare a variable speed with value 722537 in Java?
int speed = 722537;
### Instruction: How to declare a variable speed with value 722537 in Java? ### Response: int speed = 722537;
31,318,319
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); }
3,450,011
ru
Java
var_decl
beginner
Как объявить переменную value со значением 831524 в Java?
int value = 831524;
### Instruction: Как объявить переменную value со значением 831524 в Java? ### Response: int value = 831524;
1,671,327
en
C#
var_decl
beginner
How to declare a variable index with value 593886 in C#?
int index = 593886;
### Instruction: How to declare a variable index with value 593886 in C#? ### Response: int index = 593886;
13,763,430
kk
C#
logic_ops
advanced
C# тилінде 2056 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2056 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,213,688
kk
JavaScript
var_decl
beginner
JavaScript тілінде 659950 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 659950;
### Instruction: JavaScript тілінде 659950 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 659950;
3,516,490
ru
Java
var_decl
beginner
Как объявить переменную result со значением 473295 в Java?
int result = 473295;
### Instruction: Как объявить переменную result со значением 473295 в Java? ### Response: int result = 473295;
82,131,517
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);
35,576,136
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 86 простым.
public bool IsPrime() { int n = 86; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 86 простым. ### Response: public bool IsPrime() { int n = 86; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,814,911
ru
Python
var_decl
beginner
Как объявить переменную total со значением 244485 в Python?
total = 244485
### Instruction: Как объявить переменную total со значением 244485 в Python? ### Response: total = 244485
1,796,826
en
Unity
var_decl
beginner
How to declare a variable timer with value 643314 in Unity?
int timer = 643314;
### Instruction: How to declare a variable timer with value 643314 in Unity? ### Response: int timer = 643314;
3,740,256
kk
C++
var_decl
beginner
C++ тілінде 764850 мәнімен count айнымалысын қалай жариялауға болады?
int count = 764850;
### Instruction: C++ тілінде 764850 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 764850;
96,750,319
en
Java
logic_ops
advanced
Write a function that determines if the number 148 is prime in Java.
public bool IsPrime() { int n = 148; 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 148 is prime in Java. ### Response: public bool IsPrime() { int n = 148; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
98,897,093
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);
4,708,635
ru
C#
var_decl
beginner
Как объявить переменную health со значением 708791 в C#?
int health = 708791;
### Instruction: Как объявить переменную health со значением 708791 в C#? ### Response: int health = 708791;
97,818,385
kk
C#
logic_ops
advanced
C# тилінде 2054 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2054 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
96,337,988
en
Unity
logic_ops
intermediate
Write logic to check if the year 1933 is a leap year in Unity.
public bool IsLeap() { int y = 1933; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1933 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1933; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,942,716
ru
Unity
var_decl
beginner
Как объявить переменную total со значением 166755 в Unity?
int total = 166755;
### Instruction: Как объявить переменную total со значением 166755 в Unity? ### Response: int total = 166755;
21,737,813
en
C#
logic_ops
advanced
Write a function that determines if the number 100 is prime in C#.
public bool IsPrime() { int n = 100; 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 100 is prime in C#. ### Response: public bool IsPrime() { int n = 100; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
77,866,725
en
C++
logic_ops
intermediate
Write logic to check if the year 2017 is a leap year in C++.
public bool IsLeap() { int y = 2017; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2017 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2017; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,751,160
en
Java
var_decl
beginner
How to declare a variable total with value 215531 in Java?
int total = 215531;
### Instruction: How to declare a variable total with value 215531 in Java? ### Response: int total = 215531;
2,883,515
ru
Unity
var_decl
beginner
Как объявить переменную score со значением 776305 в Unity?
int score = 776305;
### Instruction: Как объявить переменную score со значением 776305 в Unity? ### Response: int score = 776305;
4,586,044
kk
C#
var_decl
beginner
C# тілінде 339887 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 339887;
### Instruction: C# тілінде 339887 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 339887;
732,838
en
C++
var_decl
beginner
How to declare a variable size with value 17144 in C++?
int size = 17144;
### Instruction: How to declare a variable size with value 17144 in C++? ### Response: int size = 17144;
633,584
ru
Unity
var_decl
beginner
Как объявить переменную health со значением 833450 в Unity?
int health = 833450;
### Instruction: Как объявить переменную health со значением 833450 в Unity? ### Response: int health = 833450;
3,432,282
ru
C++
var_decl
beginner
Как объявить переменную value со значением 84794 в C++?
int value = 84794;
### Instruction: Как объявить переменную value со значением 84794 в C++? ### Response: int value = 84794;
3,473,570
en
C++
var_decl
beginner
How to declare a variable rate with value 896941 in C++?
int rate = 896941;
### Instruction: How to declare a variable rate with value 896941 in C++? ### Response: int rate = 896941;
79,614,317
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);
513,856
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 9221.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9221) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 9221. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9221) << std::endl;
87,088,785
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();
32,940,933
kk
C++
array_ops
advanced
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
183,933
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 8184.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8184)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 8184. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8184)); }
82,045,317
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; }
710,118
kk
C#
sum_n
intermediate
C# тілінде 1-ден 7080-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7080));
### Instruction: C# тілінде 1-ден 7080-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7080));
36,220,731
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;
2,294,668
en
Python
var_decl
beginner
How to declare a variable amount with value 835856 in Python?
amount = 835856
### Instruction: How to declare a variable amount with value 835856 in Python? ### Response: amount = 835856
262,330
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 7309.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7309));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 7309. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7309));
48,561,953
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; }
1,333,697
en
Python
var_decl
beginner
How to declare a variable total with value 300861 in Python?
total = 300861
### Instruction: How to declare a variable total with value 300861 in Python? ### Response: total = 300861