{"id":21206155,"url":"https://github.com/joemar25/mother-chef","last_synced_at":"2025-07-26T05:18:55.746Z","repository":{"id":41373538,"uuid":"362141885","full_name":"joemar25/Mother-Chef","owner":"joemar25","description":"This is just for my hobby since I love to code. This repo contains random programs and problems that I solve using Java, Python, and Octave.","archived":false,"fork":false,"pushed_at":"2023-12-16T15:07:05.000Z","size":38589,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-24T05:48:53.088Z","etag":null,"topics":["java","octave","python"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joemar25.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-04-27T14:29:09.000Z","updated_at":"2024-04-13T03:09:45.000Z","dependencies_parsed_at":"2023-01-19T22:53:01.360Z","dependency_job_id":"85d4c8d6-5f1a-4719-afe6-0aaa5f18cb5e","html_url":"https://github.com/joemar25/Mother-Chef","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemar25%2FMother-Chef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemar25%2FMother-Chef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemar25%2FMother-Chef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemar25%2FMother-Chef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joemar25","download_url":"https://codeload.github.com/joemar25/Mother-Chef/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225629883,"owners_count":17499294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","octave","python"],"created_at":"2024-11-20T20:54:23.024Z","updated_at":"2024-11-20T20:54:23.771Z","avatar_url":"https://github.com/joemar25.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e Programming Problems and Solution \u003c/h3\u003e\n\n```Markdown\nThe programming language used to solve the problems here in this Journey is Java.\n\nJava is the first langauge I learned while was starting college. I had a lot of fun using it and solving problems with it.\n\nThough I am using different other languages now for different purposes and school stuff's, I am back at using Java again.\n\nNow, I am challenging myself to become much better using this language to become a better problem solver.\n```\n\n\u003ch2\u003e Tables of Contents \u003c/h2\u003e\n\n1. [The Cheaper Cab](#the-cheaper-cab)\n2. [Rating Improvement](#rating-improvement)\n3. [Volume Control](#volume-control)\n4. [Fitness](#fitness)\n5. [ATM](#atm)\n6. [Best of Two](#best-of-two)\n7. [Ezio and Guards](#ezio-and-guards)\n8. [Pass or Fail](#pass-or-fail)\n9. [Credit Score](#credit-score)\n10. [Enormous Input Test](#enormous-input-test)\n11. [Course Registration](#course-registration)\n12. [New2](#new2)\n13. [New3](#new3)\n\n---\n\n## The Cheaper Cab\n\n```Markdown\nProblem Code    : CABS\nFile Name       : CABS.java\nStatus          : Correct Answer\nSubmission ID   : 68012123\n```\n\n\u003c/h3\u003e Problem \u003c/h3\u003e\n\nChef has to travel to another place. For this, he can avail any one of two cab services.\n\n- The first cab service charges `X` rupees.\n- The second cab service charges `Y` rupees.\n\nChef wants to spend the minimum amount of money. Which cab service should Chef take?\n\n\u003ch3\u003e Input Format \u003c/h3\u003e\n\n- The first line will contain `T` - the number of test cases. Then the test cases follow.\n- The first and only line of each test case contains two integers `X` and `Y` - the prices of first and second cab services respectively.\n\n\u003ch3\u003e Output Format \u003c/h3\u003e\n\nFor each test case, output FIRST if the first cab service is cheaper, output SECOND if the second cab service is cheaper, output ANY if both cab services have the same price.\n\nYou may print each character of FIRST, SECOND and ANY in uppercase or lowercase (for example, any, aNy, Any will be considered identical).\n\n\u003ch3\u003e Constraints \u003c/h3\u003e\n\n- 1 ≤ T ≤ 100\n- 1 ≤ X, Y ≤ 100\n\n\u003ch3\u003e Sample \u003c/h3\u003e\n\n| Input     | Output  |\n| :---------| :------ |\n| 3         |         |\n| 30 65     | FIRST   |\n| 42 42     | ANY     |\n| 90 50     | SECOND  |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nTest case 1: The first cab service is cheaper than the second cab service.\n\nTest case 2: Both the cab services have the same price.\n\nTest case 3: The second cab service is cheaper than the first cab service.\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\n\nclass CABS {\n\n    static void check(int x, int y) {\n        if (x == y)\n            System.out.println(\"ANY\");\n        else if (x \u003c y)\n            System.out.println(\"FIRST\");\n        else\n            System.out.println(\"SECOND\");\n    }\n\n    public static void main(String[] args) {\n        Scanner in = new Scanner(System.in);\n        int t = in.nextInt();\n        while(t \u003e 0) {\n            int x = in.nextInt();\n            int y = in.nextInt();\n            check(x, y);\n            t--;\n        }\n        in.close();\n    }\n}\n```\n\n---\n\n## Rating Improvement\n\n```Markdown\nContest Code    : COOK142\nProblem Code    : ADVANCE\nFile Name       : ADVANCE.java\nStatus          : Correct Answer\nSubmission ID   : 68015253\n```\n\n\u003ch3\u003e Problem \u003c/h3\u003e\n\nChef's current rating is `X`, and he wants to improve it. It is generally recommended that a person with rating `X` should solve problems whose difficulty lies in the range [X, X + 200][X, X + 200], i.e, problems whose difficulty is at least `X` and at most X+200X + 200.\n\nYou find out that Chef is currently solving problems with a difficulty of `Y`.\n\nIs Chef following the recommended practice or not?\n\n\u003ch3\u003e Input Format \u003c/h3\u003e\n\nFor each test case, output on a new line YES if Chef is following the recommended practice style, and NO otherwise.\n\nEach letter of the output may be printed in either lowercase or uppercase. For example, the strings YES, yEs, and Yes will be considered identical.\n\n\u003ch3\u003e Constraints \u003c/h3\u003e\n\n- 1 ≤ T ≤ 100\n- 1 ≤ X, Y ≤ 4000\n\n\u003ch3\u003e Sample \u003c/h3\u003e\n\n| Input     | Output  |\n| :---------| :------ |\n| 5         |         |\n| 1300 1500 | YES     |\n| 1201 1402 | NO      |\n| 300 4000  | NO      |\n| 723 805   | YES     |\n| 1330 512  | NO      |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nTest case 1: Chef's current rating is 1300, so he should solve problems with difficulty lying in [1300,1500][1300,1500]. Since 1500 lies in [1300,1500][1300,1500], Chef is doing his practice in a recommended way :)\n\nTest case 2: Chef's current rating is 1201, so he should solve problems with difficulty lying in [1201,1401][1201,1401]. Since 1402 does not lie in [1201,1401][1201,1401], Chef is not doing his practice in a recommended way :(\n\nTest case 3: Chef's current rating is 300, so he should solve problems with difficulty lying in [300,500][300,500]. Since 4000 does not lie in [300,500][300,500], Chef is not doing his practice in a recommended way :(\n\nTest case 4: Chef's current rating is 723, so he should solve problems with difficulty lying in [723,923][723,923]. Since 805 lies in [723,923][723,923], Chef is doing his practice in a recommended way :)\n\nTest case 5: Chef's current rating is 1330, so he should solve problems with difficulty lying in [1330,1530][1330,1530]. Since 512 does not lie in [1330,1530][1330,1530], Chef is not doing his practice in a recommended way :(\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\n\nclass ADVANCE {\n    static void solve(int x, int y) {\n        if (y \u003e= x \u0026\u0026 y \u003c= x + 200)\n            System.out.println(\"YES\");\n        else\n            System.out.println(\"NO\");\n    }\n\n    public static void main(String[] args) throws Exception {\n        Scanner in = new Scanner(System.in);\n        int x, y, t = in.nextInt();\n        while (t \u003e 0) {\n            x = in.nextInt();\n            y = in.nextInt();\n            solve(x, y);\n            t--;\n        }\n        in.close();\n    }\n}\n```\n\n---\n\n## Volume Control\n\n```Markdown\nContest Code    : START32\nProblem Code    : VOLCONTROL\nFile Name       : VOLCONTROL.java\nStatus          : Correct Answer\nSubmission ID   : 68019500\n```\n\n\u003ch3\u003e Problem \u003c/h3\u003e\n\nChef is watching TV. The current volume of the TV is `X`. Pressing the volume up button of the TV remote increases the volume by 1 while pressing the volume down button decreases the volume by 1. Chef wants to change the volume from `X` to `Y`. Find the minimum number of button presses required to do so.\n\n\u003ch3\u003e Input Format \u003c/h3\u003e\n\n- The first line contains a single integer TT - the number of test cases. Then the test cases follow.\n\n- The first and only line of each test case contains two integers `X` and `Y` - the initial volume and final volume of the TV.\n\n\u003ch3\u003e Output Format \u003c/h3\u003e\n\nFor each test case, output the minimum number of times Chef has to press a button to change the volume from `X` to `Y`.\n\n\u003ch3\u003e Constraints \u003c/h3\u003e\n\n- 1 ≤ T ≤ 100\n- 1 ≤ X, Y ≤ 100\n\n\u003ch3\u003e Sample \u003c/h3\u003e\n\n| Input | Output  |\n| :-----| :------ |\n| 2     |         |\n| 50 54 | 4       |\n| 12 10 | 2       |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nTest Case 1: Chef can press the volume up button 44 times to increase the volume from 5050 to 5454.\n\nTest Case 2: Chef can press the volume down button 22 times to decrease the volume from 1212 to 1010.\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\n\nclass VOLCONTROL {\n    static void check(int x, int y) {\n        if (x \u003e y)\n            System.out.println(x - y);\n        else\n            System.out.println(y - x);\n    }\n\n    public static void main(String[] args) throws java.lang.Exception {\n        Scanner in = new Scanner(System.in);\n        int t = in.nextInt();\n        while (t \u003e 0) {\n            int x = in.nextInt();\n            int y = in.nextInt();\n            check(x, y);\n            t--;\n        }\n        in.close();\n    }\n}\n```\n\n## Fitness\n\n```Markdown\nContest Code    : JUNE222\nProblem Code    : FIT\nFile Name       : FIT.java\nStatus          : Correct Answer\nSubmission ID   : 68026668\n```\n\n\u003ch3\u003e Problem \u003c/h3\u003e\n\nChef wants to become fit for which he decided to walk to the office and return home by walking. It is known that Chef's office is `X` km away from his home.\n\nIf his office is open on 55 days in a week, find the number of kilometers Chef travels through office trips in a week.\n\n\u003ch3\u003e Input Format \u003c/h3\u003e\n\n- First line will contain `T`, number of test cases. Then the test cases follow.\n- Each test case contains of a single line consisting of single integer `X`.\n\n\u003ch3\u003e Output Format \u003c/h3\u003e\n\nFor each test case, output the number of kilometers Chef travels through office trips in a week.\n\n\u003ch3\u003e Constraints \u003c/h3\u003e\n\n- 1 ≤ T ≤ 10\n- 1 ≤ X ≤ 10\n\n\u003ch3\u003e Sample \u003c/h3\u003e\n\n| Input | Output  |\n| :-----| :------ |\n| 4     |         |\n| 1     | 10      |\n| 3     | 30      |\n| 7     | 70      |\n| 10    | 100     |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nTest case 1: The office is 1 km away. Thus, to go to the office and come back home, Chef has to walk 2 kms in a day. In a week with 5 working days, Chef has to travel 2⋅5 = 102⋅5=10 kms in total.\n\nTest case 2: The office is 3 kms away. Thus, to go to the office and come back home, Chef has to walk 6 kms in a day. In a week with 5 working days, Chef has to travel 6⋅5 = 306⋅5=30 kms in total.\n\nTest case 3: The office is 7 kms away. Thus, to go to the office and come back home, Chef has to walk 14 kms in a day. In a week with 5 working days, Chef has to travel 14⋅5 = 7014⋅5=70 kms in total.\n\nTest case 4: The office is 10 kms away. Thus, to go to the office and come back home, Chef has to walk 20 kms in a day. In a week with 5 working days, Chef has to travel 20⋅5 = 10020⋅5=100 kms in total.\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\n\nclass FIT {\n\n    public static void main(String[] args) throws Exception {\n        Scanner in = new Scanner(System.in);\n        int t = in.nextInt();\n        while (t \u003e 0) {\n            int x = in.nextInt();\n            System.out.println(x * 10);\n            t--;\n        }\n        in.close();\n    }\n}\n```\n\n## ATM\n\n```Markdown\nProblem Code    : HS08TEST\nFile Name       : HS08TEST.java\nStatus          : Correct Answer\nSubmission ID   : 68027028\n```\n\n\u003ch3\u003e Problem \u003c/h3\u003e\n\nPooja would like to withdraw X $US from an ATM. The cash machine will only accept the transaction if X is a multiple of 5, and Pooja's account balance has enough cash to perform the withdrawal transaction (including bank charges). For each successful withdrawal the bank charges 0.50 $US.\n\nCalculate Pooja's account balance after an attempted transaction.\n\n\u003ch3\u003e Input Format \u003c/h3\u003e\n\n- Positive integer 0 \u003c X \u003c= 2000 - the amount of cash which Pooja wishes to withdraw.\n\n- Nonnegative number 0\u003c= Y \u003c= 2000 with two digits of precision - Pooja's initial account balance.\n\n\u003ch3\u003e Output Format \u003c/h3\u003e\n\nOutput the account balance after the attempted transaction, given as a number with two digits of precision. If there is not enough money in the account to complete the transaction, output the current bank balance.\n\n\u003ch3\u003e Example - Successful Transaction \u003c/h3\u003e\n\n```\nInput:\n30 120.00\n\nOutput:\n89.50\n```\n\n\u003ch3\u003e Example - Incorrect Withdrawal Amount (not multiple of 5) \u003c/h3\u003e\n\n```\nInput:\n42 120.00\n\nOutput:\n120.00\n```\n\n\u003ch3\u003e Example - Insufficient Funds \u003c/h3\u003e\n\n```\nInput:\n300 120.00\n\nOutput:\n120.00\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\nimport java.io.InputStream;\n\nclass HS08TEST {\n    \n    public static void main(String[] args) throws Exception {\n        InputStream inputStream = System.in;\n        Scanner in = new Scanner(inputStream);\n        int x = in.nextInt();\n        float y = in.nextFloat();\n        if (x % 5 == 0 \u0026\u0026 y \u003e= x + 0.5f)\n            System.out.println(y - x - 0.5f);\n        else\n            System.out.println(y);\n        in.close();\n    }\n\n}\n```\n\n---\n\n## Best of Two\n\n```Markdown\nContest Code    : START45\nProblem Code    : BESTOFTWO\nFile Name       : BESTOFTWO.java\nStatus          : Correct Answer\nSubmission ID   : 68027384\n```\n\n\u003ch3\u003e Problem \u003c/h3\u003e\n\nChef took an examination two times. In the first attempt, he scored `X` marks while in the second attempt he scored `Y` marks. According to the rules of the examination, the best score out of the two attempts will be considered as the final score. Determine the final score of the Chef.\n\n\u003ch3\u003e Input Format \u003c/h3\u003e\n\n- The first line contains a single integer TT — the number of test cases. Then the test cases follow.\n\n- The first line of each test case contains two integers `X` and `Y` — the marks scored by Chef in the first attempt and second attempt respectively.\n\n\u003ch3\u003e Output Format \u003c/h3\u003e\n\nFor each test case, output the final score of Chef in the examination.\n\n\u003ch3\u003e Constraints \u003c/h3\u003e\n\n- 1 ≤ T ≤ 1000\n- 1 ≤ X, Y ≤ 1000\n\n\u003ch3\u003e Sample \u003c/h3\u003e\n\n| Input | Output  |\n| :-----| :------ |\n| 4     |         |\n| 40 60 | 60      |\n| 67 55 | 67      |\n| 50 50 | 50      |\n| 1 100 | 100     |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nTest Case 1: The best score out of the two attempts is 60.\n\nTest Case 2: The best score out of the two attempts is 67.\n\nTest Case 3: The best score out of the two attempts is 50.\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\n\nclass Codechef {\n    static void check(int first, int second) {\n        if (first \u003e second)\n            System.out.println(first);\n        else\n            System.out.println(second);\n    }\n\n    public static void main(String[] args) throws Exception {\n        Scanner in = new Scanner(System.in);\n        int n = in.nextInt();\n        for (int i = 0; i \u003c n; i++) {\n            int first = in.nextInt();\n            int second = in.nextInt();\n            check(first, second);\n        }\n        in.close();\n    }\n}\n```\n\n## Ezio and Guards\n\n```Markdown\nContest Code    : APRIL221\nProblem Code    : MANIPULATE\nFile Name       : MANIPULATE.java\nStatus          : Correct Answer\nSubmission ID   : 68030424\n```\n\n\u003ch3\u003e Problem \u003c/h3\u003e\n\nEzio can manipulate at most `X` number of guards with the apple of eden.\n\nGiven that there are `Y` number of guards, predict if he can safely manipulate all of them.\n\n\u003ch3\u003e Input Format \u003c/h3\u003e\n\n- First line will contain TT, number of test cases. Then the test cases follow.\n\n- Each test case contains of a single line of input, two integers `X` and `Y`.\n\n\u003ch3\u003e Output Format \u003c/h3\u003e\n\nFor each test case, print YES if it is possible for Ezio to manipulate all the guards. Otherwise, print NO.\n\nYou may print each character of the string in uppercase or lowercase (for example, the strings YeS, yEs, yes and YES will all be treated as identical).\n\n\u003ch3\u003e Constraints \u003c/h3\u003e\n\n- 1 ≤ T ≤ 100\n- 1 ≤ X, Y ≤ 100\n\n\u003ch3\u003e Sample \u003c/h3\u003e\n\n| Input | Output  |\n| :-----| :------ |\n| 3     |         |\n| 5 7   | NO      |\n| 6 6   | YES     |\n| 9 1   | YES     |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nTest Case 1: Ezio can manipulate at most 5 guards. Since there are 7 guards, he cannot manipulate all of them.\n\nTest Case 2: Ezio can manipulate at most 6 guards. Since there are 6 guards, he can manipulate all of them.\n\nTest Case 3: Ezio can manipulate at most 9 guards. Since there is only 1 guard, he can manipulate the guard.\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\n\nclass Codechef {\n    public static void main(String[] args) throws Exception {\n        Scanner in = new Scanner(System.in);\n        int t = in.nextInt();\n        while (t \u003e 0) {\n        int x = in.nextInt();\n        int y = in.nextInt();\n        if (x \u003e= y)\n            System.out.println(\"YES\");\n            else\n            System.out.println(\"NO\");\n            t--;\n        }\n        in.close();\n    }\n}\n```\n\n## Pass Or Fail\n\n```Markdown\nContest Code    : START16\nProblem Code    : PASSORFAIL\nFile Name       : PASSORFAIL.java\nStatus          : Correct Answer\nSubmission ID   : 68260282\n```\n\n\u003ch3\u003e Problem \u003c/h3\u003e\n\nChef is struggling to pass a certain college course.\n\nThe test has a total of `N` question, each question carries `3` marks for a correct answer and `-1` for an incorrect answer. Chef is a risk-averse person so he decided to attempt all the questions. It is known that Chef got `X` questions correct and the rest of them incorrect. For Chef to pass the course he must score at least `P` marks.\n\nWill Chef be able to pass the exam or not?\n\n\u003ch3\u003e Input Format \u003c/h3\u003e\n\n- First line will contain `T`, number of testcases. Then the testcases follow.\n\n- Each testcase contains of a single line of input, three integers `N`, `X`, `P`.\n\n\u003ch3\u003e Output Format \u003c/h3\u003e\n\nFor each test case output \"PASS\" if Chef passes the exam and \"FAIL\" if Chef fails the exam.\n\nYou may print each character of the string in uppercase or lowercase (for example, the strings \"pAas\", \"pass\", \"Pass\" and \"PASS\" will all be treated as identical).\n\n\u003ch3\u003e Constraints \u003c/h3\u003e\n\n- 1 ≤ T ≤ 1000\n- 1 ≤ N ≤ 100\n- 0 ≤ X ≤ N\n- 0 ≤ P ≤ 3 ⋅ N\n\n\u003ch3\u003e Sample \u003c/h3\u003e\n\n| Input | Output    |\n| :------ | :------ |\n| 3       |         |\n| 5 2 3   | PASS    |\n| 5 2 4   | FAIL    |\n| 4 0 0   | FAIL    |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nTest Case 1: Chef gets `2` questions correct giving him `6` marks and since he got `3` questions incorrect so he faces a penalty of `-3`. So Chef's final score is `3` and the passing marks are also `3`, so he passes the exam :)\n\nTest Case 2: Chef's total marks are `3` and since the passing marks are `4`, Chef fails the test :(\n\nTest Case 3: Chef got all the problems wrong and thus his total score is `-4`. Since the passing marks are `0`, Chef fails the exam :(\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\n\nclass PASSORFAIL {\n\n    static void exam(int n, int x, int p) {\n        int penalty = x - n;\n        int score = x * 3;\n        int total = penalty + score;\n        if (p \u003c= total)\n            System.out.println(\"PASS\");\n        else\n            System.out.println(\"FAIL\");\n    }\n\n    public static void main(String[] args) throws Exception {\n        Scanner in = new Scanner(System.in);\n        int t = in.nextInt();\n        while (t \u003e 0) {\n            int n = in.nextInt();\n            int x = in.nextInt();\n            int p = in.nextInt();\n            exam(n, x, p);\n            t--;\n        }\n        in.close();\n    }\n}\n```\n\n## Credit Score\n\n```Markdown\nContest Code    : LTIME106\nProblem Code    : CREDSCORE\nFile Name       : CREDSCORE.java\nStatus          : Correct Answer\nSubmission ID   : 68424065\n```\n\n\u003ch3\u003e Problem \u003c/h3\u003e\n\nTo access CRED programs, one needs to have a credit score of `750` or more.\nGiven that the present credit score is `X`, determine if one can access CRED programs or not.\n\nIf it is possible to access CRED programs, output `YES`, otherwise output `NO`.\n\n\u003ch3\u003e Input Format \u003c/h3\u003e\n\n- The first and only line of input contains a single integer `X`, the credit score.\n\n\u003ch3\u003e Output Format \u003c/h3\u003e\n\nPrint `YES` if it is possible to access CRED programs. Otherwise, print `NO`.\n\nYou may print each character of the string in uppercase or lowercase (for example, the strings `YeS`, `yEs`, `yes` and `YES` will all be treated as identical).\n\n\u003ch3\u003e Constraints \u003c/h3\u003e\n\n- 0 ≤ X ≤ 1000\n\n\u003ch3\u003e Subtasks \u003c/h3\u003e\n\n- Subtask 1 (100 points): Original constraints.\n\n\u003ch3\u003e Sample 1 \u003c/h3\u003e\n\n| Input   | Output  |\n| :------ | :------ |\n| 821     | YES     |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nSince 823 ≥ 750, it is possible to access CRED programs.\n```\n\n\u003ch3\u003e Sample 2 \u003c/h3\u003e\n\n| Input   | Output  |\n| :------ | :------ |\n| 251     | NO      |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nSince 251 \u003c 750, it is not possible to access CRED programs.\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\n\nclass CREDSCORE {\n\n    static void check(int x) {\n        if (0 \u003c= x \u0026\u0026 x \u003c= 1000 \u0026\u0026 x \u003e= 750)\n            System.out.println(\"YES\");\n        else\n            System.out.println(\"NO\");\n    }\n\n    public static void main(String[] args) throws Exception {\n        Scanner in = new Scanner(System.in);\n        int x = in.nextInt();\n        check(x);\n        in.close();\n    }\n}\n```\n\n## Enormous Input Test\n\nProblem Code:\nINTEST\n\nProblem Code:\n\n```Markdown\nProblem Code    : INTEST\nFile Name       : INTEST.java\nStatus          : Correct Answer\nSubmission ID   : 68424297\n```\n\n\u003ch3\u003e Problem \u003c/h3\u003e\n\nThe purpose of this problem is to verify whether the method you are using to read input data is sufficiently fast to handle problems branded with the enormous Input/Output warning. You are expected to be able to process at least 2.5MB of input data per second at runtime.\n\n\u003ch3\u003e Input \u003c/h3\u003e\n\nThe input begins with two positive integers n k (n, k\u003c=107). The next n lines of input contain one positive integer ti, not greater than 109, each.\n\n\u003ch3\u003e Output \u003c/h3\u003e\n\nWrite a single integer to output, denoting how many integers ti are divisible by k.\n\n\u003ch3\u003e Sample 1 \u003c/h3\u003e\n\n| Input      | Output  |\n| :--------- | :------ |\n| 7 3        | 4       |\n| 1          |         |\n| 51         |         |\n| 966369     |         |\n| 7          |         |\n| 9          |         |\n| 999996     |         |\n| 11         |         |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nThe integers divisible by 33 are 51, 966369, 9 and 999996. Thus, there are 4 integers in total.\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\n\nclass INTEST {\n\n    public static void main(String[] args) {\n        Scanner in = new Scanner(System.in);\n        int res = 0;\n        int n = in.nextInt();\n        int k = in.nextInt();\n\n        while (n \u003e 0) {\n            int x = in.nextInt();\n            if (x % k == 0)\n                res++;\n            n--;\n        }\n        System.out.println(res);\n        in.close();\n    }\n}\n```\n\n## Course Registration\n\n```Markdown\nContest Code    : START32\nProblem Code    : COURSEREG\nFile Name       : COURSEREG.java\nStatus          : Correct Answer\nSubmission ID   : 68439823\n```\n\n\u003ch3\u003e Problem \u003c/h3\u003e\n\nThere is a group of `N` friends who wish to enroll in a course together. The course has a maximum capacity of `M` students that can register for it. If there are `K` other students who have already enrolled in the course, determine if it will still be possible for all the `N` friends to do so or not.\n\n\u003ch3\u003e Input Format \u003c/h3\u003e\n\n- The first line contains a single integer `T` - the number of test cases. Then the test cases follow.\n\n- Each test case consists of a single line containing three integers `N`, `M` and `K` - the size of the friend group, the capacity of the course and the number of students already registered for the course.\n\n\u003ch3\u003e Constraints \u003c/h3\u003e\n\n- 1 ≤ T ≤ 1000\n- 1 ≤ N ≤ M ≤ 100\n- 0 ≤ K ≤ M\n\n\u003ch3\u003e Sample 1 \u003c/h3\u003e\n\n| Input     | Output |\n| :-------- | :----- |\n| 7         |        |\n| 2 50 27   | Yes    |\n| 5 40 38   | No     |\n| 100 100 0 | Yes    |\n\n\u003ch3\u003e Explanation \u003c/h3\u003e\n\n```Markdown\nTest Case 1: The 2 friends can enroll in the course as it has enough seats to accommodate them and the 27 other students at the same time..\n\nTest Case 2: The course does not have enough seats to accommodate the 5 friends and the 38 other students at the same time.\n```\n\n\u003ch3\u003e My Solution \u003c/h3\u003e\n\n```Java\nimport java.util.Scanner;\n\nclass COURSEREG {\n    \n    static void check(int n, int m, int k) {\n        int size = n + k;\n        if (size \u003c= m)\n            System.out.println(\"Yes\");\n        else\n            System.out.println(\"No\");\n    }\n\n    public static void main(String[] args) throws Exception {\n        Scanner in = new Scanner(System.in);\n        int t = in.nextInt();\n        for (; t \u003e 0; t--) {\n            int n = in.nextInt();\n            int m = in.nextInt();\n            int k = in.nextInt();\n            check(n, m, k);\n        }\n        in.close();\n    }\n}\n```\n\n\n// M1ENROL : 68520744\n\n// ACCURACY: 68528722\n\n// TEA: 68612155\n\n// FLOW001: 68613059\n\n---\n\nthe random codes area also part here\nand a project in numerical analysis\n\n# ` \"Thank You For Reading This File\" `\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoemar25%2Fmother-chef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoemar25%2Fmother-chef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoemar25%2Fmother-chef/lists"}