id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
3,466,533
ru
Unity
var_decl
beginner
Как объявить переменную index со значением 242221 в Unity?
int index = 242221;
### Instruction: Как объявить переменную index со значением 242221 в Unity? ### Response: int index = 242221;
442,022
kk
Unity
factorial
advanced
Unity тілінде 717 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(717)); }
### Instruction: Unity тілінде 717 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(717)); }
34,746,550
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();
835,928
ru
Java
var_decl
beginner
Как объявить переменную health со значением 306281 в Java?
int health = 306281;
### Instruction: Как объявить переменную health со значением 306281 в Java? ### Response: int health = 306281;
78,521,041
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2097 високосным.
public bool IsLeap() { int y = 2097; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2097 високосным. ### Response: public bool IsLeap() { int y = 2097; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
73,543,274
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); }
54,994,907
kk
C#
array_ops
intermediate
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; }
44,353,340
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); }
789,313
ru
C#
var_decl
beginner
Как объявить переменную result со значением 245520 в C#?
int result = 245520;
### Instruction: Как объявить переменную result со значением 245520 в C#? ### Response: int result = 245520;
19,707,051
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; }
4,843,540
ru
Java
var_decl
beginner
Как объявить переменную score со значением 59868 в Java?
int score = 59868;
### Instruction: Как объявить переменную score со значением 59868 в Java? ### Response: int score = 59868;
40,777,723
ru
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);
50,851,736
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1963 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1963; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1963 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1963; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
2,885,884
en
Python
var_decl
beginner
How to declare a variable size with value 326699 in Python?
size = 326699
### Instruction: How to declare a variable size with value 326699 in Python? ### Response: size = 326699
1,151,289
kk
Python
var_decl
beginner
Python тілінде 356604 мәнімен limit айнымалысын қалай жариялауға болады?
limit = 356604
### Instruction: Python тілінде 356604 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: limit = 356604
14,277,564
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; }
18,801,049
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2060 високосным.
public bool IsLeap() { int y = 2060; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2060 високосным. ### Response: public bool IsLeap() { int y = 2060; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,013,636
en
Unity
var_decl
beginner
How to declare a variable timer with value 17072 in Unity?
int timer = 17072;
### Instruction: How to declare a variable timer with value 17072 in Unity? ### Response: int timer = 17072;
4,000,729
en
Python
var_decl
beginner
How to declare a variable level with value 566637 in Python?
level = 566637
### Instruction: How to declare a variable level with value 566637 in Python? ### Response: level = 566637
4,031,024
en
JavaScript
var_decl
beginner
How to declare a variable size with value 974686 in JavaScript?
let size = 974686;
### Instruction: How to declare a variable size with value 974686 in JavaScript? ### Response: let size = 974686;
85,383,776
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; }
4,502,737
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 978730 in JavaScript?
let limit = 978730;
### Instruction: How to declare a variable limit with value 978730 in JavaScript? ### Response: let limit = 978730;
85,721
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 1579.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1579));
### Instruction: Write a function in JavaScript that calculates the factorial of 1579. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1579));
59,039,141
en
JavaScript
string_ops
intermediate
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
90,566,122
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2073 is a leap year in JavaScript.
function isLeap() { let y = 2073; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2073 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2073; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
702,265
kk
C#
var_decl
beginner
C# тілінде 238306 мәнімен result айнымалысын қалай жариялауға болады?
int result = 238306;
### Instruction: C# тілінде 238306 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 238306;
594,249
ru
C#
var_decl
beginner
Как объявить переменную health со значением 783362 в C#?
int health = 783362;
### Instruction: Как объявить переменную health со значением 783362 в C#? ### Response: int health = 783362;
95,434,910
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 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: Напишите на C# функцию, определяющую, является ли число 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; }
1,596,197
ru
C#
var_decl
beginner
Как объявить переменную index со значением 767602 в C#?
int index = 767602;
### Instruction: Как объявить переменную index со значением 767602 в C#? ### Response: int index = 767602;
4,727,081
ru
Python
var_decl
beginner
Как объявить переменную result со значением 263303 в Python?
result = 263303
### Instruction: Как объявить переменную result со значением 263303 в Python? ### Response: result = 263303
70,891,136
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
249,044
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 7253.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7253));
### Instruction: Write a function in C# that sums numbers from 1 to 7253. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7253));
84,316,734
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; }
91,771,218
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(); }
80,213,501
en
Java
logic_ops
advanced
Write a function that determines if the number 464 is prime in Java.
public bool IsPrime() { int n = 464; 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 464 is prime in Java. ### Response: public bool IsPrime() { int n = 464; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
61,708,767
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; }
26,128,697
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,663,449
kk
Unity
var_decl
beginner
Unity тілінде 448312 мәнімен y айнымалысын қалай жариялауға болады?
int y = 448312;
### Instruction: Unity тілінде 448312 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 448312;
1,473,099
ru
Java
var_decl
beginner
Как объявить переменную y со значением 857271 в Java?
int y = 857271;
### Instruction: Как объявить переменную y со значением 857271 в Java? ### Response: int y = 857271;
52,784,930
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; }
3,183,718
kk
JavaScript
var_decl
beginner
JavaScript тілінде 37234 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 37234;
### Instruction: JavaScript тілінде 37234 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 37234;
59,341,930
en
Unity
logic_ops
intermediate
Write logic to check if the year 2011 is a leap year in Unity.
public bool IsLeap() { int y = 2011; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2011 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2011; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,086,874
ru
Unity
var_decl
beginner
Как объявить переменную index со значением 304819 в Unity?
int index = 304819;
### Instruction: Как объявить переменную index со значением 304819 в Unity? ### Response: int index = 304819;
41,921,043
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,648,707
en
JavaScript
var_decl
beginner
How to declare a variable rate with value 493235 in JavaScript?
let rate = 493235;
### Instruction: How to declare a variable rate with value 493235 in JavaScript? ### Response: let rate = 493235;
94,346,262
en
Unity
logic_ops
intermediate
Write a function that determines if the number 483 is prime in Unity.
public bool IsPrime() { int n = 483; 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 483 is prime in Unity. ### Response: public bool IsPrime() { int n = 483; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,424,598
en
Java
var_decl
beginner
How to declare a variable total with value 177893 in Java?
int total = 177893;
### Instruction: How to declare a variable total with value 177893 in Java? ### Response: int total = 177893;
46,925,651
en
C#
array_ops
advanced
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,799,429
kk
C#
var_decl
beginner
C# тілінде 35919 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 35919;
### Instruction: C# тілінде 35919 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 35919;
76,302,986
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2032 високосным.
public bool IsLeap() { int y = 2032; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2032 високосным. ### Response: public bool IsLeap() { int y = 2032; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,240,885
en
Java
var_decl
beginner
How to declare a variable count with value 746054 in Java?
int count = 746054;
### Instruction: How to declare a variable count with value 746054 in Java? ### Response: int count = 746054;
15,435,809
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; }
3,917,285
en
Unity
var_decl
beginner
How to declare a variable amount with value 473899 in Unity?
int amount = 473899;
### Instruction: How to declare a variable amount with value 473899 in Unity? ### Response: int amount = 473899;
98,758,683
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; }
63,303,948
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
4,131,606
kk
C#
var_decl
beginner
C# тілінде 727543 мәнімен health айнымалысын қалай жариялауға болады?
int health = 727543;
### Instruction: C# тілінде 727543 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 727543;
58,052,934
ru
Unity
string_ops
advanced
Напишите на 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; }
85,029,716
kk
C++
logic_ops
advanced
C++ тилінде 1968 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1968; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1968 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1968; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,009,350
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 8999.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8999));
### Instruction: Write a function in Java that sums numbers from 1 to 8999. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8999));
60,773,226
en
Python
string_ops
advanced
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,568,357
ru
C++
var_decl
beginner
Как объявить переменную x со значением 575416 в C++?
int x = 575416;
### Instruction: Как объявить переменную x со значением 575416 в C++? ### Response: int x = 575416;
108,725
kk
C++
factorial
advanced
C++ тілінде 1653 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1653) << std::endl;
### Instruction: C++ тілінде 1653 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1653) << std::endl;
1,186,308
en
JavaScript
var_decl
beginner
How to declare a variable y with value 548587 in JavaScript?
let y = 548587;
### Instruction: How to declare a variable y with value 548587 in JavaScript? ### Response: let y = 548587;
69,902,928
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); }
37,295,900
kk
Unity
logic_ops
advanced
Unity тилінде 1942 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1942; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1942 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1942; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
350,452
kk
JavaScript
factorial
advanced
JavaScript тілінде 4573 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(4573));
### Instruction: JavaScript тілінде 4573 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(4573));
39,246,003
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на C# функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
102,560
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 8764.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8764)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 8764. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8764)); }
1,130,169
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 3258-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3258));
### Instruction: JavaScript тілінде 1-ден 3258-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3258));
11,734,994
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Unity функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
88,529,246
en
Java
array_ops
intermediate
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
4,686,386
ru
Unity
var_decl
beginner
Как объявить переменную rate со значением 755952 в Unity?
int rate = 755952;
### Instruction: Как объявить переменную rate со значением 755952 в Unity? ### Response: int rate = 755952;
80,195,777
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 1933 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1933; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1933 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1933; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
57,634,918
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 2100 високосным.
public bool IsLeap() { int y = 2100; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2100 високосным. ### Response: public bool IsLeap() { int y = 2100; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,202,469
en
C++
var_decl
beginner
How to declare a variable data with value 445879 in C++?
int data = 445879;
### Instruction: How to declare a variable data with value 445879 in C++? ### Response: int data = 445879;
32,418,456
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; }
49,474,982
kk
Unity
string_ops
advanced
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
10,992,780
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1918 високосным.
function isLeap() { let y = 1918; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1918 високосным. ### Response: function isLeap() { let y = 1918; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,937,902
kk
C#
var_decl
beginner
C# тілінде 629175 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 629175;
### Instruction: C# тілінде 629175 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 629175;
36,220,966
kk
Python
logic_ops
intermediate
Python тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2048 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2048 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
39,396,929
en
JavaScript
logic_ops
advanced
Write logic to check if the year 2060 is a leap year in JavaScript.
function isLeap() { let y = 2060; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2060 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2060; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
25,268,258
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]
20,082,905
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 2073 високосным.
function isLeap() { let y = 2073; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2073 високосным. ### Response: function isLeap() { let y = 2073; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,471,497
en
Python
var_decl
beginner
How to declare a variable x with value 459719 in Python?
x = 459719
### Instruction: How to declare a variable x with value 459719 in Python? ### Response: x = 459719
87,806,838
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); }
75,853,077
en
Java
logic_ops
intermediate
Write a function that determines if the number 494 is prime in Java.
public bool IsPrime() { int n = 494; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Write a function that determines if the number 494 is prime in Java. ### Response: public bool IsPrime() { int n = 494; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
864,622
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 267030 в C#?
int buffer = 267030;
### Instruction: Как объявить переменную buffer со значением 267030 в C#? ### Response: int buffer = 267030;
40,277,677
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; }
1,991,359
kk
C++
var_decl
beginner
C++ тілінде 997522 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 997522;
### Instruction: C++ тілінде 997522 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 997522;
453,378
kk
Java
sum_n
intermediate
Java тілінде 1-ден 6712-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6712));
### Instruction: Java тілінде 1-ден 6712-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6712));
41,147,909
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
3,692,929
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 822011 в JavaScript?
let data = 822011;
### Instruction: Как объявить переменную data со значением 822011 в JavaScript? ### Response: let data = 822011;
2,421,605
ru
C++
var_decl
beginner
Как объявить переменную x со значением 398719 в C++?
int x = 398719;
### Instruction: Как объявить переменную x со значением 398719 в C++? ### Response: int x = 398719;
79,386,556
en
Python
string_ops
advanced
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]
1,051,268
ru
Unity
var_decl
beginner
Как объявить переменную limit со значением 873618 в Unity?
int limit = 873618;
### Instruction: Как объявить переменную limit со значением 873618 в Unity? ### Response: int limit = 873618;
4,837,021
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 140471 in JavaScript?
let offset = 140471;
### Instruction: How to declare a variable offset with value 140471 in JavaScript? ### Response: let offset = 140471;
3,341,481
en
Unity
var_decl
beginner
How to declare a variable limit with value 937991 in Unity?
int limit = 937991;
### Instruction: How to declare a variable limit with value 937991 in Unity? ### Response: int limit = 937991;
88,731,661
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; }
2,810,283
ru
C#
var_decl
beginner
Как объявить переменную x со значением 857878 в C#?
int x = 857878;
### Instruction: Как объявить переменную x со значением 857878 в C#? ### Response: int x = 857878;
21,139,992
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 1944 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1944; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1944 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1944; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }