id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
1,958,880
en
Unity
var_decl
beginner
How to declare a variable count with value 174846 in Unity?
int count = 174846;
### Instruction: How to declare a variable count with value 174846 in Unity? ### Response: int count = 174846;
415,500
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 1578.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1578)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 1578. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1578)); }
98,548,388
en
C#
logic_ops
intermediate
Write logic to check if the year 1947 is a leap year in C#.
public bool IsLeap() { int y = 1947; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1947 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1947; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
78,850,581
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1998 високосным.
public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1998 високосным. ### Response: public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,100,642
kk
JavaScript
var_decl
beginner
JavaScript тілінде 817594 мәнімен speed айнымалысын қалай жариялауға болады?
let speed = 817594;
### Instruction: JavaScript тілінде 817594 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: let speed = 817594;
3,520,084
kk
JavaScript
var_decl
beginner
JavaScript тілінде 38231 мәнімен rate айнымалысын қалай жариялауға болады?
let rate = 38231;
### Instruction: JavaScript тілінде 38231 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: let rate = 38231;
2,220,958
en
Python
var_decl
beginner
How to declare a variable buffer with value 792508 in Python?
buffer = 792508
### Instruction: How to declare a variable buffer with value 792508 in Python? ### Response: buffer = 792508
650,228
kk
Unity
var_decl
beginner
Unity тілінде 61109 мәнімен score айнымалысын қалай жариялауға болады?
int score = 61109;
### Instruction: Unity тілінде 61109 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 61109;
25,518,834
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; }
73,483,413
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
17,495,059
kk
Unity
logic_ops
intermediate
Unity тилінде 2093 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2093; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2093 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2093; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,403,074
ru
Python
var_decl
beginner
Как объявить переменную data со значением 937839 в Python?
data = 937839
### Instruction: Как объявить переменную data со значением 937839 в Python? ### Response: data = 937839
90,420,150
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;
46,113,016
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); }
41,729,777
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; }
78,811,093
kk
C#
string_ops
intermediate
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
70,654,228
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 125 простым.
public bool IsPrime() { int n = 125; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 125 простым. ### Response: public bool IsPrime() { int n = 125; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,686,343
kk
C++
var_decl
beginner
C++ тілінде 665652 мәнімен value айнымалысын қалай жариялауға болады?
int value = 665652;
### Instruction: C++ тілінде 665652 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 665652;
50,589,444
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
156,800
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 3788-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3788));
### Instruction: JavaScript тілінде 1-ден 3788-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3788));
22,031,435
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
81,263,135
en
Unity
string_ops
intermediate
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(); }
39,731,178
en
Unity
array_ops
intermediate
Write a function that filters only even numbers from a list in Unity.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Unity. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,265,975
ru
C#
var_decl
beginner
Как объявить переменную count со значением 517251 в C#?
int count = 517251;
### Instruction: Как объявить переменную count со значением 517251 в C#? ### Response: int count = 517251;
2,735,933
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 272369 в JavaScript?
let score = 272369;
### Instruction: Как объявить переменную score со значением 272369 в JavaScript? ### Response: let score = 272369;
60,764,749
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2045 високосным.
public bool IsLeap() { int y = 2045; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2045 високосным. ### Response: public bool IsLeap() { int y = 2045; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
202,618
kk
C#
factorial
advanced
C# тілінде 9868 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9868));
### Instruction: C# тілінде 9868 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9868));
53,881,756
en
Unity
array_ops
intermediate
Write a function that filters only even numbers from a list in Unity.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Unity. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
86,785,093
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
11,124,644
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
2,106,445
en
C#
var_decl
beginner
How to declare a variable offset with value 495712 in C#?
int offset = 495712;
### Instruction: How to declare a variable offset with value 495712 in C#? ### Response: int offset = 495712;
2,073,735
kk
C#
var_decl
beginner
C# тілінде 450196 мәнімен total айнымалысын қалай жариялауға болады?
int total = 450196;
### Instruction: C# тілінде 450196 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 450196;
61,927,421
kk
C#
logic_ops
advanced
C# тилінде 2074 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2074; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2074 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2074; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
696,308
en
Python
var_decl
beginner
How to declare a variable result with value 499874 in Python?
result = 499874
### Instruction: How to declare a variable result with value 499874 in Python? ### Response: result = 499874
3,815,774
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 83792 в Unity?
int speed = 83792;
### Instruction: Как объявить переменную speed со значением 83792 в Unity? ### Response: int speed = 83792;
99,187,309
kk
C++
logic_ops
advanced
C++ тилінде 345 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 345; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 345 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 345; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
12,012,009
kk
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); }
30,417
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 5250-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5250));
### Instruction: JavaScript тілінде 1-ден 5250-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5250));
90,898,372
en
Python
array_ops
advanced
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
37,804,805
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);
4,689,552
en
Python
var_decl
beginner
How to declare a variable amount with value 671953 in Python?
amount = 671953
### Instruction: How to declare a variable amount with value 671953 in Python? ### Response: amount = 671953
55,941,675
kk
Python
logic_ops
intermediate
Python тилінде 284 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 284 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 284 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 284 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
24,293,179
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
78,453,408
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); }
1,123,048
en
Python
var_decl
beginner
How to declare a variable rate with value 59471 in Python?
rate = 59471
### Instruction: How to declare a variable rate with value 59471 in Python? ### Response: rate = 59471
39,282,225
en
C#
logic_ops
intermediate
Write a function that determines if the number 39 is prime in C#.
public bool IsPrime() { int n = 39; 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 39 is prime in C#. ### Response: public bool IsPrime() { int n = 39; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
617,617
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 2662.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2662));
### Instruction: Write a function in Java that calculates the factorial of 2662. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2662));
4,954,576
ru
C#
var_decl
beginner
Как объявить переменную value со значением 739614 в C#?
int value = 739614;
### Instruction: Как объявить переменную value со значением 739614 в C#? ### Response: int value = 739614;
57,905,011
en
Unity
string_ops
advanced
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; }
1,280,217
kk
Unity
var_decl
beginner
Unity тілінде 663766 мәнімен score айнымалысын қалай жариялауға болады?
int score = 663766;
### Instruction: Unity тілінде 663766 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 663766;
1,601,955
kk
JavaScript
var_decl
beginner
JavaScript тілінде 621368 мәнімен limit айнымалысын қалай жариялауға болады?
let limit = 621368;
### Instruction: JavaScript тілінде 621368 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: let limit = 621368;
45,387,090
en
Java
logic_ops
advanced
Write logic to check if the year 2008 is a leap year in Java.
public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2008 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,253,813
kk
Java
var_decl
beginner
Java тілінде 383488 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 383488;
### Instruction: Java тілінде 383488 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 383488;
3,598,295
kk
Unity
var_decl
beginner
Unity тілінде 497428 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 497428;
### Instruction: Unity тілінде 497428 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 497428;
4,631,188
ru
C#
var_decl
beginner
Как объявить переменную y со значением 422935 в C#?
int y = 422935;
### Instruction: Как объявить переменную y со значением 422935 в C#? ### Response: int y = 422935;
44,860,624
kk
C++
logic_ops
advanced
C++ тилінде 102 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 102; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 102 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 102; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
569,335
kk
C#
factorial
advanced
C# тілінде 7070 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7070));
### Instruction: C# тілінде 7070 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7070));
3,448,742
ru
Java
var_decl
beginner
Как объявить переменную timer со значением 184207 в Java?
int timer = 184207;
### Instruction: Как объявить переменную timer со значением 184207 в Java? ### Response: int timer = 184207;
27,096,243
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]
13,542,269
ru
Python
string_ops
advanced
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
3,565,079
en
Java
var_decl
beginner
How to declare a variable count with value 20225 in Java?
int count = 20225;
### Instruction: How to declare a variable count with value 20225 in Java? ### Response: int count = 20225;
814,113
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 888365 в Unity?
int buffer = 888365;
### Instruction: Как объявить переменную buffer со значением 888365 в Unity? ### Response: int buffer = 888365;
747,642
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 3654.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3654)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 3654. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3654)); }
74,716,413
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 189 is prime in JavaScript.
function isPrime() { let n = 189; 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 189 is prime in JavaScript. ### Response: function isPrime() { let n = 189; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
90,001,903
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 250 простым.
public bool IsPrime() { int n = 250; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 250 простым. ### Response: public bool IsPrime() { int n = 250; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,057,849
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 8366.
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(8366) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 8366. ### 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(8366) << std::endl;
2,100,512
kk
Java
var_decl
beginner
Java тілінде 987848 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 987848;
### Instruction: Java тілінде 987848 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 987848;
581,213
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 3149-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3149)); }
### Instruction: Unity тілінде 1-ден 3149-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3149)); }
73,071,751
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
38,236,695
en
Java
logic_ops
advanced
Write logic to check if the year 1918 is a leap year in Java.
public bool IsLeap() { int y = 1918; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1918 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1918; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,758,373
kk
Python
var_decl
beginner
Python тілінде 510510 мәнімен x айнымалысын қалай жариялауға болады?
x = 510510
### Instruction: Python тілінде 510510 мәнімен x айнымалысын қалай жариялауға болады? ### Response: x = 510510
54,546,015
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 102 простым.
def is_prime(): n = 102 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 102 простым. ### Response: def is_prime(): n = 102 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,978,026
en
C++
var_decl
beginner
How to declare a variable level with value 768046 in C++?
int level = 768046;
### Instruction: How to declare a variable level with value 768046 in C++? ### Response: int level = 768046;
540,980
en
Java
var_decl
beginner
How to declare a variable count with value 496866 in Java?
int count = 496866;
### Instruction: How to declare a variable count with value 496866 in Java? ### Response: int count = 496866;
27,274,527
kk
C++
logic_ops
intermediate
C++ тилінде 2036 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2036; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2036 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2036; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
87,785,400
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
2,437,677
en
JavaScript
var_decl
beginner
How to declare a variable result with value 617220 in JavaScript?
let result = 617220;
### Instruction: How to declare a variable result with value 617220 in JavaScript? ### Response: let result = 617220;
58,211,390
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);
1,670,417
en
C#
var_decl
beginner
How to declare a variable result with value 722319 in C#?
int result = 722319;
### Instruction: How to declare a variable result with value 722319 in C#? ### Response: int result = 722319;
23,469,890
en
Java
string_ops
intermediate
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; }
52,222,336
kk
Unity
string_ops
intermediate
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,398,811
kk
C#
var_decl
beginner
C# тілінде 45273 мәнімен score айнымалысын қалай жариялауға болады?
int score = 45273;
### Instruction: C# тілінде 45273 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 45273;
28,783,216
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
47,471,891
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; }
4,453,222
ru
C#
var_decl
beginner
Как объявить переменную result со значением 40205 в C#?
int result = 40205;
### Instruction: Как объявить переменную result со значением 40205 в C#? ### Response: int result = 40205;
45,207,130
ru
C#
array_ops
advanced
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,799,007
kk
C++
var_decl
beginner
C++ тілінде 919226 мәнімен data айнымалысын қалай жариялауға болады?
int data = 919226;
### Instruction: C++ тілінде 919226 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 919226;
59,008,776
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);
4,784,004
ru
Python
var_decl
beginner
Как объявить переменную count со значением 89131 в Python?
count = 89131
### Instruction: Как объявить переменную count со значением 89131 в Python? ### Response: count = 89131
1,639,917
kk
Java
var_decl
beginner
Java тілінде 946712 мәнімен size айнымалысын қалай жариялауға болады?
int size = 946712;
### Instruction: Java тілінде 946712 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 946712;
17,892,014
kk
Unity
string_ops
advanced
Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
3,573,449
ru
C++
var_decl
beginner
Как объявить переменную rate со значением 439973 в C++?
int rate = 439973;
### Instruction: Как объявить переменную rate со значением 439973 в C++? ### Response: int rate = 439973;
57,924,159
kk
C#
logic_ops
intermediate
C# тилінде 314 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 314; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 314 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 314; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
68,384,952
en
Unity
logic_ops
advanced
Write a function that determines if the number 468 is prime in Unity.
public bool IsPrime() { int n = 468; 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 468 is prime in Unity. ### Response: public bool IsPrime() { int n = 468; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
11,112,237
en
Unity
logic_ops
intermediate
Write logic to check if the year 1978 is a leap year in Unity.
public bool IsLeap() { int y = 1978; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1978 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1978; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,424,000
en
Unity
var_decl
beginner
How to declare a variable offset with value 779529 in Unity?
int offset = 779529;
### Instruction: How to declare a variable offset with value 779529 in Unity? ### Response: int offset = 779529;
32,943,252
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); }
51,564,144
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('');
38,538,702
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]
1,002,451
kk
C#
var_decl
beginner
C# тілінде 538882 мәнімен result айнымалысын қалай жариялауға болады?
int result = 538882;
### Instruction: C# тілінде 538882 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 538882;