Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

A point in the x-y plane is represented by its x-coordinate and y-coordinate. Design a class, PointType in Java, that can store and process a point in the x-y plane.Every circle has a center and a radius. Given the radius, we can determine the circle’s area and circumference. Given the center, we can determine its position in the x-y plane. The center of a circle is a point in the x-y plane. Design a class, CircleType that can store the radius and center of the circle. Because the center is a point in the x-y plane and you designed the class to capture the properties of a point from PointType class. You must derive the class CircleType from the class PointType. You should be able to perform the usual operations on a circle, such as setting the radius, printing the radius, calculating and printing the area and circumference, and carrying out the usual operations on the center.


Given polynomial, write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0 format.


Input

The first line contains a single integer N.

Next N lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes coefficient of Pi.


Output

Print the polynomial in the format Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0, where Pi's are powers in decreasing order, Ci is coefficient, and C0 is constant. There will be space before and after the plus or minus sign.

If the coeff is zero, then don't print the term.

If the term with the highest degree is negative, the term should represent -Cix^Pi.

For the term where power is 1, represent it as C1x instead of C1x^1.

If the polynomial degree is zero and the const term is also zero, then print 0 to represent the polynomial.

For term Cix^Pi, if the coeff of the term Ci is 1, print x^Pi instead of 1x^Pi.


Constraints

N <= 100 0 <= Pi < 1000 -1000 <= Ci <= 1000


Sample Input

5

0 2

1 3

2 1

4 7

3 6

Output:


7x^4 + 6x^3 + x^2 + 3x + 2

Make a using four class program. helpful program. Store information sale something return complete things information.


Given a list of numbers, write a program to print the smallest positive integer missing in the given numbers.Input


The input will be a single line containing numbers separated by space.Output


The output should be a single line containing the smallest missing number from given numbers.Explanation


For example, if the input numbers are 3, 1, 2, 5, 3, 7, 7.

The number 1, 2, 3 are present. But the number 4 is not. So 4 is the smallest positive integers that is missing from the given numbers.




Given date-time D, write a program to print the time left for the next New Year.Input


The input will be a single line containing the date-time in the string format similar to "Dec 30 2020 02:43 PM".Output


The output should be a single line containing hours and minutes left for the next new year in the format similar to "33 hours 17 minutes".Explanation


For example, if the given date-time is "Dec 30 2020 02:43 PM", the difference between "Dec 30 2020 02:43 PM" and "Jan 1 2021 00:00 AM" is 1 day 9 hours 17 minutes. The difference in hours and minutes is 1 * 24 + 9 hours and 17 minutes. So the output should be "33 hours 17 minutes".




Given two dates D1 and D2, write a program to count the number of Saturdays and Sundays from D1 to D2 (including D1 and D2).

The date in string format is like "8 Feb 2021".Input


The first line of input will contain date D1 in the string format.

The second line of input will contain date D2 in the string format.Output


The output should be a single line containing two integers separated by space.Explanation


For example, if the given dates are "25 Jan 2021" and "14 Feb 2021", the Saturdays and Sundays dates from "25 Jan 2021" to "14 Feb 2021" are

"30 Jan 2021" is a Saturday

"31 Jan 2021" is a Sunday

"6 Feb 2021" is a Saturday

"7 Feb 2021" is a Sunday

"13 Feb 2021" is a Saturday

"14 Feb 2021" is a Sunday

So the output should be

Saturday: 3

Sunday: 3




Implement the following features:

  • the board should be stored as a three-element list, while each element is another three-element list (the inner lists represent rows) so that all of the squares may be accessed using the following syntax:

board[row][column]

  • each of the inner list's elements can contain 'O', 'X', or a digit representing the square's number (such a square is considered free)
  • the board's appearance should be exactly the same as the one presented in the example.

Drawing a random integer number can be done by utilizing a Python function called randrange(). The example program below shows how to use it (the program prints ten random numbers from 0 to 8).

Note: the from-import instruction provides an access to the randrange function defined within an external Python module called random.

from random import randrange

for i in range(10):

   print(randrange(8))


a)   Declare the variable fptr to be a pointer to an object of type float.

b)   Declare the floating point variables num1 and num2.

c)   Assign 100.20 to num1 as initial value.

d)   Assign the address of variable num1 to pointer variable fptr.

e)   Print the value of object pointed to by fptr.

f)    Assign the value of the object pointed to by fptr to variable num2.

g)   Print the value of num2.

h)   Print the address of num1.

i)     Print the address stored in fptr.


T9 is a predictive text technology for mobile phones (specifically those that contain a 3×4 numeric keypad). It allows the user to press a numerical key and form a set of keys. With this set of keys, T9 figures out exactly the word the user meant to type based on the list of valid words also called a dictionary. Here is exactly how T9 works: If the user wants to type a message to someone using a cellphone pad, they will only use the digits 2 through 9. The table below provides the corresponding letters for each digit:


Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.


Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.


abcdefghij12345678910

klmnopqr1112131415161718

stuvwxyz1920212223242526Input


The input will be a string in the single line containing spaces and letters (both uppercase and lowercase).Output


The output should be a single line containing the secret message. All characters in the output should be in lower case.Explanation


For example, if the given input is "python", "p" should replaced with "16", similarly"y" with "25","t" with "20","h" with "8","o" with "15","n" with "14". So the output should be "16-25-20-8-15-14".




LATEST TUTORIALS
APPROVED BY CLIENTS