PTA 1018 hammer scissors cloth (20 points) C

preface Details determine success or failure. stem Everyone should be able to play the game of "hammer, scissors and cloth": two people give gestures at the same time, and the winning and losing rules are shown in the figure: Now the record of the confrontation between the two is given. Please count the number of wins, draws an ...

Posted by totof06 on Sat, 08 Jan 2022 09:33:15 +0100

PTA group programming ladder competition (1 ~ 20 questions)

1. L1-001 Hello World (5 points) This super simple question has no input. You only need to output the famous short sentence "Hello World" in one line That's it. Input example: nothing Output example: Hello World! public class Main { public static void main(String[] args) { System.out.println("Hello World!"); } } 2. L1-0 ...

Posted by mighty on Mon, 03 Jan 2022 20:07:37 +0100

Question 4 C of PTA 2022

preface Start 2022 and participate in PTA new year challenge: I'm really a konjac. Really, I just know I'm a konjac. I didn't expect that I'm so weak... So weak that I want to scold myself: You confused vegetable dog who can't even solve the problem! Don't settle down, Deep Learning!!! The lessons learned are summarized as follows: Limit ...

Posted by Codewarrior123 on Mon, 03 Jan 2022 05:23:22 +0100

PTA programming ladder competition (questions 41 ~ 60)

It's not easy to make. Please praise me. I'm Wang Rui. Nice to meet you! 41. Eliminate singles (20 points) L1-046 divide singles (20 points) The so-called "Bachelor" here does not mean single. Wang La ~ refers to the numbers composed of 1, such as 1, 11, 111, 1111, etc. It is said that any single can be divided by an odd number ...

Posted by arunkar on Mon, 03 Jan 2022 02:38:48 +0100

7-33 family property

Given everyone's family members and their own real estate, please count the population, per capita real estate area and number of real estate sets of each family. Input format: Enter the first line to give a positive integer N (≤ 1000), and then N lines to give a person's real estate in the following format: No. parent k child 1... ...

Posted by ShashidharNP on Sun, 02 Jan 2022 11:42:16 +0100

PAT (Basic Level) Practice (Chinese) 1015 theory of virtue and talent (25 points)

This problem is not difficult. Just figure out the progressive sorting relationship and use the sort function. This problem tells us that if you can write c + + with vector, you don't use {array, and if you can use struct, you should use struct Original question: Sima Guang, a historian of the Song Dynasty, wrote a famous "theory of virt ...

Posted by Buddha443556 on Mon, 20 Dec 2021 05:32:19 +0100