diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index a688a216..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,33 +0,0 @@ - - -Closes **TODO**. - - - -Problem link: **TODO**. - -### Changes introduced in this PR - - - -**TODO** - diff --git a/.github/workflows/inactive_issue.yml b/.github/workflows/inactive_issue.yml deleted file mode 100644 index 275b0de2..00000000 --- a/.github/workflows/inactive_issue.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Close inactive issues - -on: - # Run this workflow weekly on Friday at 00:00 UTC - # [cron](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07) - schedule: - - cron: "0 0 * * 5" - -jobs: - close-inactive-issues: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - # https://github.com/marketplace/actions/close-stale-issues - - uses: actions/stale@v5 - with: - days-before-issue-stale: 30 - days-before-issue-close: 10 - stale-issue-label: "inactive" - stale-issue-message: "This issue was labeled `inactive` because it has been open for 30 days with no activity." - close-issue-message: "This issue was closed because there has been no activity for 10 days since being labeled as `inactive`." - # do not mark PRs as stale/inactive - days-before-pr-stale: -1 - # do not close PRs - days-before-pr-close: -1 - diff --git a/small_to_large/en.md b/small_to_large/en.md new file mode 100644 index 00000000..421248ae --- /dev/null +++ b/small_to_large/en.md @@ -0,0 +1,35 @@ +# Dimik - Small to Large + +There will be three different numbers. They have to be printed from small to large sizes. + +### Solution +* Case number will be according to the number of test case. +* Finding the middle number which is not min or max is the main task. + +### C++ +```cpp +#include +#include +using namespace std; + +int main(){ + int test_case; + cin >> test_case; + + for (int i = 1; i <= test_case; i++){ + int n1, n2, n3; + cin >> n1 >> n2 >> n3; + int a = min(min(n1, n2), n3); + int b = max(max(n1, n2), n3); + if (n1 != a && n1 != b) + { + cout << "Case " << i <<": " << a << " " << n1 << " " << b << endl; + } else if (n2 != a && n2 != b){ + cout << "Case " << i <<": " << a << " " << n2 << " " << b << endl; + } else if (n3 != a && n3 != b){ + cout << "Case " << i <<": " << a << " " << n3 << " " << b << endl; + } + } + return 0; +} +``` \ No newline at end of file diff --git a/square_number/en.md b/square_number/en.md new file mode 100644 index 00000000..96d2717e --- /dev/null +++ b/square_number/en.md @@ -0,0 +1,37 @@ +# Dimik - Square Number + +You have to write a program to find out whether a number is a perfect square or not. + +### Solution +* Store the square root of the number in a variable +* check if the multiplication of that variable is equal to input the number + +# C++ +```cpp +#include +#include +using namespace std; + +int main() +{ + int test_case; + cin >> test_case; + + for (int i = 1; i <= test_case; i++) + { + int num; + cin >> num; + int a = sqrt(num); + if (a * a == num) + { + cout << "YES" << endl; + } + else + { + cout << "NO" << endl; + } + } + + return 0; +} +``` \ No newline at end of file