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
67,543,248
kk
Java
logic_ops
advanced
Java тилінде 395 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 395; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 395 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 395; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
40,321,125
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 2059 високосным.
public bool IsLeap() { int y = 2059; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2059 високосным. ### Response: public bool IsLeap() { int y = 2059; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
97,522,486
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2087 високосным.
public bool IsLeap() { int y = 2087; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2087 високосным. ### Response: public bool IsLeap() { int y = 2087; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
29,339,065
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; }
40,692,964
kk
C++
logic_ops
advanced
C++ тилінде 1953 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1953; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1953 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1953; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
474,613
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 4600.
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(4600) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 4600. ### 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(4600) << std::endl;
70,368,802
en
Python
logic_ops
advanced
Write a function that determines if the number 13 is prime in Python.
def is_prime(): n = 13 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 13 is prime in Python. ### Response: def is_prime(): n = 13 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
2,184,842
en
Java
var_decl
beginner
How to declare a variable timer with value 654835 in Java?
int timer = 654835;
### Instruction: How to declare a variable timer with value 654835 in Java? ### Response: int timer = 654835;
88,787,721
kk
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; }
3,356,143
en
Java
var_decl
beginner
How to declare a variable timer with value 358513 in Java?
int timer = 358513;
### Instruction: How to declare a variable timer with value 358513 in Java? ### Response: int timer = 358513;
62,710,849
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; }
697,935
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 7714.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7714) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 7714. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7714) << std::endl;
4,193,686
en
Python
var_decl
beginner
How to declare a variable index with value 710902 in Python?
index = 710902
### Instruction: How to declare a variable index with value 710902 in Python? ### Response: index = 710902
96,382,250
kk
Python
logic_ops
advanced
Python тилінде 1910 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1910 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1910 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1910 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
2,148,519
en
Python
var_decl
beginner
How to declare a variable result with value 576635 in Python?
result = 576635
### Instruction: How to declare a variable result with value 576635 in Python? ### Response: result = 576635
39,587,729
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(); }
85,956,376
en
C++
logic_ops
advanced
Write a function that determines if the number 235 is prime in C++.
public bool IsPrime() { int n = 235; 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 235 is prime in C++. ### Response: public bool IsPrime() { int n = 235; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
23,046,406
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1937 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1937; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1937 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1937; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,585,530
ru
Java
var_decl
beginner
Как объявить переменную health со значением 730017 в Java?
int health = 730017;
### Instruction: Как объявить переменную health со значением 730017 в Java? ### Response: int health = 730017;
88,135
kk
Python
factorial
advanced
Python тілінде 7076 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7076))
### Instruction: Python тілінде 7076 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7076))
21,973,547
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; }
4,721,710
ru
C#
var_decl
beginner
Как объявить переменную size со значением 934004 в C#?
int size = 934004;
### Instruction: Как объявить переменную size со значением 934004 в C#? ### Response: int size = 934004;
81,290,495
kk
Java
string_ops
advanced
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
67,227,513
en
Python
logic_ops
advanced
Write a function that determines if the number 109 is prime in Python.
def is_prime(): n = 109 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 109 is prime in Python. ### Response: def is_prime(): n = 109 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
93,714,931
en
JavaScript
string_ops
advanced
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();
65,802,838
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; }
61,549,821
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
79,663,312
en
Unity
logic_ops
intermediate
Write a function that determines if the number 225 is prime in Unity.
public bool IsPrime() { int n = 225; 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 225 is prime in Unity. ### Response: public bool IsPrime() { int n = 225; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
79,118,860
kk
Java
logic_ops
advanced
Java тилінде 90 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 90; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 90 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 90; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
78,322,671
en
Python
logic_ops
advanced
Write a function that determines if the number 40 is prime in Python.
def is_prime(): n = 40 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 40 is prime in Python. ### Response: def is_prime(): n = 40 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
85,295,810
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; }
88,765,060
en
Python
logic_ops
advanced
Write a function that determines if the number 61 is prime in Python.
def is_prime(): n = 61 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 61 is prime in Python. ### Response: def is_prime(): n = 61 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
50,169,131
kk
Unity
array_ops
advanced
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,660,424
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 406284 в JavaScript?
let index = 406284;
### Instruction: Как объявить переменную index со значением 406284 в JavaScript? ### Response: let index = 406284;
447,393
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 5002-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5002));
### Instruction: JavaScript тілінде 1-ден 5002-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5002));
25,874,483
en
JavaScript
array_ops
advanced
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
91,591,860
en
Unity
logic_ops
intermediate
Write a function that determines if the number 440 is prime in Unity.
public bool IsPrime() { int n = 440; 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 440 is prime in Unity. ### Response: public bool IsPrime() { int n = 440; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,103,167
kk
Java
var_decl
beginner
Java тілінде 182247 мәнімен count айнымалысын қалай жариялауға болады?
int count = 182247;
### Instruction: Java тілінде 182247 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 182247;
346,766
ru
C++
var_decl
beginner
Как объявить переменную limit со значением 401320 в C++?
int limit = 401320;
### Instruction: Как объявить переменную limit со значением 401320 в C++? ### Response: int limit = 401320;
3,974,620
en
Python
var_decl
beginner
How to declare a variable speed with value 839099 in Python?
speed = 839099
### Instruction: How to declare a variable speed with value 839099 in Python? ### Response: speed = 839099
4,167,912
en
Unity
var_decl
beginner
How to declare a variable size with value 952159 in Unity?
int size = 952159;
### Instruction: How to declare a variable size with value 952159 in Unity? ### Response: int size = 952159;
1,343,523
en
C#
var_decl
beginner
How to declare a variable score with value 548098 in C#?
int score = 548098;
### Instruction: How to declare a variable score with value 548098 in C#? ### Response: int score = 548098;
4,229,160
ru
Java
var_decl
beginner
Как объявить переменную offset со значением 800372 в Java?
int offset = 800372;
### Instruction: Как объявить переменную offset со значением 800372 в Java? ### Response: int offset = 800372;
31,204,642
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); }
4,265,522
en
C++
var_decl
beginner
How to declare a variable rate with value 757930 in C++?
int rate = 757930;
### Instruction: How to declare a variable rate with value 757930 in C++? ### Response: int rate = 757930;
3,271,063
en
JavaScript
var_decl
beginner
How to declare a variable score with value 322225 in JavaScript?
let score = 322225;
### Instruction: How to declare a variable score with value 322225 in JavaScript? ### Response: let score = 322225;
1,376,872
ru
JavaScript
var_decl
beginner
Как объявить переменную offset со значением 206082 в JavaScript?
let offset = 206082;
### Instruction: Как объявить переменную offset со значением 206082 в JavaScript? ### Response: let offset = 206082;
395,386
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 4993.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4993));
### Instruction: Write a function in Java that calculates the factorial of 4993. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4993));
44,410,336
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; }
31,154,540
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2029 високосным.
def is_leap(): year = 2029 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2029 високосным. ### Response: def is_leap(): year = 2029 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
89,812,383
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 484 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 484; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 484 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 484; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
40,138,477
en
Python
string_ops
intermediate
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
1,970,307
ru
Java
var_decl
beginner
Как объявить переменную index со значением 647936 в Java?
int index = 647936;
### Instruction: Как объявить переменную index со значением 647936 в Java? ### Response: int index = 647936;
2,996,060
kk
Unity
var_decl
beginner
Unity тілінде 508167 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 508167;
### Instruction: Unity тілінде 508167 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 508167;
1,866,564
ru
Python
var_decl
beginner
Как объявить переменную count со значением 520501 в Python?
count = 520501
### Instruction: Как объявить переменную count со значением 520501 в Python? ### Response: count = 520501
2,858,950
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 108928 в Java?
int rate = 108928;
### Instruction: Как объявить переменную rate со значением 108928 в Java? ### Response: int rate = 108928;
1,473,075
ru
JavaScript
var_decl
beginner
Как объявить переменную result со значением 63249 в JavaScript?
let result = 63249;
### Instruction: Как объявить переменную result со значением 63249 в JavaScript? ### Response: let result = 63249;
68,276,581
en
C#
string_ops
advanced
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; }
1,002,619
ru
Unity
var_decl
beginner
Как объявить переменную size со значением 409704 в Unity?
int size = 409704;
### Instruction: Как объявить переменную size со значением 409704 в Unity? ### Response: int size = 409704;
302,458
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 7463.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7463) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 7463. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7463) << std::endl;
18,217,306
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
4,116,750
kk
C#
var_decl
beginner
C# тілінде 456225 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 456225;
### Instruction: C# тілінде 456225 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 456225;
16,179,436
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2087 високосным.
public bool IsLeap() { int y = 2087; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2087 високосным. ### Response: public bool IsLeap() { int y = 2087; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
24,306,391
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); }
1,868,255
ru
C#
var_decl
beginner
Как объявить переменную amount со значением 731999 в C#?
int amount = 731999;
### Instruction: Как объявить переменную amount со значением 731999 в C#? ### Response: int amount = 731999;
45,673,786
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
90,645,395
kk
Python
logic_ops
advanced
Python тилінде 2020 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2020 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2020 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2020 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
16,583,686
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
77,997,744
kk
Unity
array_ops
advanced
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
308,124
kk
Java
factorial
advanced
Java тілінде 7239 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7239));
### Instruction: Java тілінде 7239 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7239));
466,237
kk
C#
factorial
advanced
C# тілінде 9126 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9126));
### Instruction: C# тілінде 9126 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9126));
44,393,263
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
90,928,701
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,472,362
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Java функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
14,699,383
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2000 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2000; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2000 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2000; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
23,629,714
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); }
51,596,928
kk
Unity
logic_ops
advanced
Unity тилінде 26 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 26; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 26 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 26; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
15,014,327
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; }
68,897,272
en
C++
array_ops
intermediate
Write a function that reverses a list in C++.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C++. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
30,481,598
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2057 високосным.
def is_leap(): year = 2057 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2057 високосным. ### Response: def is_leap(): year = 2057 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
2,553,220
en
C++
var_decl
beginner
How to declare a variable timer with value 363584 in C++?
int timer = 363584;
### Instruction: How to declare a variable timer with value 363584 in C++? ### Response: int timer = 363584;
790,256
en
C++
var_decl
beginner
How to declare a variable speed with value 175447 in C++?
int speed = 175447;
### Instruction: How to declare a variable speed with value 175447 in C++? ### Response: int speed = 175447;
24,202,846
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,505,341
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 183491 in JavaScript?
let offset = 183491;
### Instruction: How to declare a variable offset with value 183491 in JavaScript? ### Response: let offset = 183491;
68,106,985
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;
37,480,511
kk
Python
logic_ops
advanced
Python тилінде 1933 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1933 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1933 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1933 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
91,827,041
en
JavaScript
array_ops
advanced
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
31,153,692
en
Python
logic_ops
advanced
Write logic to check if the year 1918 is a leap year in Python.
def is_leap(): year = 1918 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1918 is a leap year in Python. ### Response: def is_leap(): year = 1918 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
58,224,351
kk
Unity
logic_ops
advanced
Unity тилінде 2032 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2032; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2032 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2032; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
97,953,130
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1911 високосным.
public bool IsLeap() { int y = 1911; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1911 високосным. ### Response: public bool IsLeap() { int y = 1911; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,268,488
en
Unity
var_decl
beginner
How to declare a variable result with value 28647 in Unity?
int result = 28647;
### Instruction: How to declare a variable result with value 28647 in Unity? ### Response: int result = 28647;
88,587,169
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
81,183,463
en
Java
logic_ops
advanced
Write logic to check if the year 2054 is a leap year in Java.
public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2054 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
19,669,773
en
Python
string_ops
advanced
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()
176,998
kk
Unity
factorial
advanced
Unity тілінде 8412 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8412)); }
### Instruction: Unity тілінде 8412 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8412)); }
2,139,770
en
JavaScript
var_decl
beginner
How to declare a variable score with value 320687 in JavaScript?
let score = 320687;
### Instruction: How to declare a variable score with value 320687 in JavaScript? ### Response: let score = 320687;
544,264
kk
Java
var_decl
beginner
Java тілінде 473218 мәнімен value айнымалысын қалай жариялауға болады?
int value = 473218;
### Instruction: Java тілінде 473218 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 473218;
48,586,759
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
2,267,307
kk
Unity
var_decl
beginner
Unity тілінде 998251 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 998251;
### Instruction: Unity тілінде 998251 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 998251;
30,266,984
kk
C++
logic_ops
advanced
C++ тилінде 2057 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2057; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2057 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2057; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }