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
78,112,534
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; }
74,044,705
kk
Unity
logic_ops
advanced
Unity тилінде 384 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 384; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 384 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 384; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
66,500,544
kk
Python
array_ops
advanced
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
1,037,582
ru
JavaScript
var_decl
beginner
Как объявить переменную x со значением 394773 в JavaScript?
let x = 394773;
### Instruction: Как объявить переменную x со значением 394773 в JavaScript? ### Response: let x = 394773;
99,620,346
en
C#
string_ops
intermediate
Write a function that checks if a string is a palindrome in 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: Write a function that checks if a string is a palindrome in 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; }
227,269
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 5980.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5980))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 5980. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5980))
68,149,278
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]
4,958,181
kk
C#
var_decl
beginner
C# тілінде 971828 мәнімен total айнымалысын қалай жариялауға болады?
int total = 971828;
### Instruction: C# тілінде 971828 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 971828;
46,700,285
en
Java
string_ops
advanced
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
302,216
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 8335.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8335))
### Instruction: Write a function in Python that sums numbers from 1 to 8335. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8335))
2,332,655
en
Python
var_decl
beginner
How to declare a variable total with value 946452 in Python?
total = 946452
### Instruction: How to declare a variable total with value 946452 in Python? ### Response: total = 946452
18,374,374
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,522,537
en
C#
var_decl
beginner
How to declare a variable timer with value 701 in C#?
int timer = 701;
### Instruction: How to declare a variable timer with value 701 in C#? ### Response: int timer = 701;
68,499,697
ru
Java
array_ops
advanced
Напишите на Java функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Java функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,332,546
ru
C#
var_decl
beginner
Как объявить переменную offset со значением 71746 в C#?
int offset = 71746;
### Instruction: Как объявить переменную offset со значением 71746 в C#? ### Response: int offset = 71746;
17,160,905
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 483 простым.
function isPrime() { let n = 483; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 483 простым. ### Response: function isPrime() { let n = 483; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
15,791,281
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;
88,667,379
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 2078 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2078; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2078 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2078; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
17,364,268
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; }
2,092,117
en
Unity
var_decl
beginner
How to declare a variable x with value 719038 in Unity?
int x = 719038;
### Instruction: How to declare a variable x with value 719038 in Unity? ### Response: int x = 719038;
58,770,901
kk
C#
logic_ops
intermediate
C# тилінде 1993 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1993; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1993 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1993; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,469,448
ru
C++
var_decl
beginner
Как объявить переменную data со значением 692383 в C++?
int data = 692383;
### Instruction: Как объявить переменную data со значением 692383 в C++? ### Response: int data = 692383;
37,238,695
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
778,133
en
Python
var_decl
beginner
How to declare a variable limit with value 258339 in Python?
limit = 258339
### Instruction: How to declare a variable limit with value 258339 in Python? ### Response: limit = 258339
29,342,391
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; }
76,775,752
en
Java
string_ops
advanced
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
1,760,023
en
JavaScript
var_decl
beginner
How to declare a variable result with value 715455 in JavaScript?
let result = 715455;
### Instruction: How to declare a variable result with value 715455 in JavaScript? ### Response: let result = 715455;
182,363
en
C++
var_decl
beginner
How to declare a variable timer with value 709498 in C++?
int timer = 709498;
### Instruction: How to declare a variable timer with value 709498 in C++? ### Response: int timer = 709498;
17,278,684
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]
53,601,642
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(); }
4,703,518
kk
C++
var_decl
beginner
C++ тілінде 271588 мәнімен health айнымалысын қалай жариялауға болады?
int health = 271588;
### Instruction: C++ тілінде 271588 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 271588;
61,317,773
kk
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; }
825,465
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 872.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(872) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 872. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(872) << std::endl;
2,374,895
ru
Java
var_decl
beginner
Как объявить переменную amount со значением 269832 в Java?
int amount = 269832;
### Instruction: Как объявить переменную amount со значением 269832 в Java? ### Response: int amount = 269832;
1,641,110
en
Java
var_decl
beginner
How to declare a variable level with value 239729 in Java?
int level = 239729;
### Instruction: How to declare a variable level with value 239729 in Java? ### Response: int level = 239729;
47,272,965
kk
JavaScript
string_ops
intermediate
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
2,957,666
kk
JavaScript
var_decl
beginner
JavaScript тілінде 101885 мәнімен buffer айнымалысын қалай жариялауға болады?
let buffer = 101885;
### Instruction: JavaScript тілінде 101885 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: let buffer = 101885;
27,218,111
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; }
20,459,146
en
Java
logic_ops
intermediate
Write logic to check if the year 2034 is a leap year in Java.
public bool IsLeap() { int y = 2034; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2034 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2034; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,853,234
kk
C++
var_decl
beginner
C++ тілінде 423387 мәнімен index айнымалысын қалай жариялауға болады?
int index = 423387;
### Instruction: C++ тілінде 423387 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 423387;
63,871,614
kk
JavaScript
string_ops
intermediate
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
2,480,334
ru
Java
var_decl
beginner
Как объявить переменную y со значением 344594 в Java?
int y = 344594;
### Instruction: Как объявить переменную y со значением 344594 в Java? ### Response: int y = 344594;
73,807,304
kk
Python
logic_ops
advanced
Python тилінде 1942 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1942 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1942 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1942 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
47,865,893
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,679,042
en
Java
var_decl
beginner
How to declare a variable y with value 630221 in Java?
int y = 630221;
### Instruction: How to declare a variable y with value 630221 in Java? ### Response: int y = 630221;
35,052,723
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); }
21,975,136
kk
Java
array_ops
advanced
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
4,430,265
ru
JavaScript
var_decl
beginner
Как объявить переменную amount со значением 959395 в JavaScript?
let amount = 959395;
### Instruction: Как объявить переменную amount со значением 959395 в JavaScript? ### Response: let amount = 959395;
41,090,343
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
3,026,111
ru
C#
var_decl
beginner
Как объявить переменную index со значением 471517 в C#?
int index = 471517;
### Instruction: Как объявить переменную index со значением 471517 в C#? ### Response: int index = 471517;
338,271
en
Java
var_decl
beginner
How to declare a variable value with value 495440 in Java?
int value = 495440;
### Instruction: How to declare a variable value with value 495440 in Java? ### Response: int value = 495440;
4,016,520
kk
Java
var_decl
beginner
Java тілінде 669392 мәнімен total айнымалысын қалай жариялауға болады?
int total = 669392;
### Instruction: Java тілінде 669392 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 669392;
91,754,273
en
JavaScript
string_ops
intermediate
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
75,750,768
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('');
43,635,448
ru
Java
string_ops
advanced
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,587,664
en
Java
var_decl
beginner
How to declare a variable limit with value 690013 in Java?
int limit = 690013;
### Instruction: How to declare a variable limit with value 690013 in Java? ### Response: int limit = 690013;
21,369,262
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; }
204,871
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 1253.
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(1253) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 1253. ### 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(1253) << std::endl;
37,184,510
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 2080 високосным.
public bool IsLeap() { int y = 2080; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2080 високосным. ### Response: public bool IsLeap() { int y = 2080; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
25,220,338
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
54,859,420
kk
Java
logic_ops
advanced
Java тилінде 144 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 144; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 144 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 144; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
84,999,307
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 105 простым.
public bool IsPrime() { int n = 105; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 105 простым. ### Response: public bool IsPrime() { int n = 105; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
17,482,070
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); }
4,750,309
ru
Python
var_decl
beginner
Как объявить переменную x со значением 163736 в Python?
x = 163736
### Instruction: Как объявить переменную x со значением 163736 в Python? ### Response: x = 163736
89,986,477
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
3,549,519
kk
Python
var_decl
beginner
Python тілінде 381840 мәнімен result айнымалысын қалай жариялауға болады?
result = 381840
### Instruction: Python тілінде 381840 мәнімен result айнымалысын қалай жариялауға болады? ### Response: result = 381840
55,889,830
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
93,225,925
en
Java
string_ops
advanced
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
64,104,346
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 114 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 114; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 114 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 114; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
64,379,195
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 208 is prime in JavaScript.
function isPrime() { let n = 208; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 208 is prime in JavaScript. ### Response: function isPrime() { let n = 208; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
80,198,695
en
JavaScript
array_ops
advanced
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
3,809,866
en
Unity
var_decl
beginner
How to declare a variable index with value 122797 in Unity?
int index = 122797;
### Instruction: How to declare a variable index with value 122797 in Unity? ### Response: int index = 122797;
42,924,594
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);
2,622,540
en
Python
var_decl
beginner
How to declare a variable offset with value 332632 in Python?
offset = 332632
### Instruction: How to declare a variable offset with value 332632 in Python? ### Response: offset = 332632
90,647,864
en
Python
logic_ops
advanced
Write a function that determines if the number 163 is prime in Python.
def is_prime(): n = 163 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Write a function that determines if the number 163 is prime in Python. ### Response: def is_prime(): n = 163 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
26,021,184
en
Java
string_ops
advanced
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
88,953
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 1695.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(1695));
### Instruction: Write a function in Java that calculates the factorial of 1695. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(1695));
1,357,002
en
C++
var_decl
beginner
How to declare a variable amount with value 101288 in C++?
int amount = 101288;
### Instruction: How to declare a variable amount with value 101288 in C++? ### Response: int amount = 101288;
16,904,001
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
90,340,713
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,354,149
ru
Java
var_decl
beginner
Как объявить переменную amount со значением 84045 в Java?
int amount = 84045;
### Instruction: Как объявить переменную amount со значением 84045 в Java? ### Response: int amount = 84045;
4,750,951
en
Java
var_decl
beginner
How to declare a variable weight with value 991388 in Java?
int weight = 991388;
### Instruction: How to declare a variable weight with value 991388 in Java? ### Response: int weight = 991388;
41,278,477
en
Unity
logic_ops
intermediate
Write a function that determines if the number 319 is prime in Unity.
public bool IsPrime() { int n = 319; 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 319 is prime in Unity. ### Response: public bool IsPrime() { int n = 319; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,725,576
ru
JavaScript
var_decl
beginner
Как объявить переменную count со значением 220496 в JavaScript?
let count = 220496;
### Instruction: Как объявить переменную count со значением 220496 в JavaScript? ### Response: let count = 220496;
3,746,158
ru
Unity
var_decl
beginner
Как объявить переменную health со значением 907179 в Unity?
int health = 907179;
### Instruction: Как объявить переменную health со значением 907179 в Unity? ### Response: int health = 907179;
121,018
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 9851.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9851));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 9851. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9851));
86,575,225
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1902 високосным.
public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1902 високосным. ### Response: public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
60,820,463
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 407 простым.
public bool IsPrime() { int n = 407; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 407 простым. ### Response: public bool IsPrime() { int n = 407; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
29,351,164
en
Python
string_ops
intermediate
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
86,498,234
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Unity функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,317,300
ru
C++
var_decl
beginner
Как объявить переменную y со значением 814406 в C++?
int y = 814406;
### Instruction: Как объявить переменную y со значением 814406 в C++? ### Response: int y = 814406;
20,078,126
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]
65,840,067
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
88,448,637
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 245 простым.
function isPrime() { let n = 245; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 245 простым. ### Response: function isPrime() { let n = 245; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
81,462,696
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
37,809
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 7502.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7502));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 7502. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7502));
25,461,486
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1947 високосным.
public bool IsLeap() { int y = 1947; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1947 високосным. ### Response: public bool IsLeap() { int y = 1947; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
29,472,437
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); }
44,333,655
kk
Java
logic_ops
intermediate
Java тилінде 416 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 416; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 416 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 416; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
11,072,918
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }