What is that largest positive integer n for which n3 100 is divisible by n 10?
If,. Using the Euclidean algorithm, we have, somust divide. The greatest integerfor whichdividesis; we can double-check manually and we find that indeed. Solution 2 (Simple)Let, then. ThenTherefore,must be divisible by, which is largest whenand Solution 3In a similar manner, we can apply synthetic division. We are looking for . Again,must be a factor of.Solution 4The key to this problem is to realize thatfor all. Since we are asked to find the maximum possiblesuch that, we have:. This is because of the property that states that ifand, then. Since, the largest factor of 900 is itself we have: ~qwertysri987 Solution 5 (Easy Modular Arithmetic)Notice that. Therefore ~asops See alsoThe problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. 45. There are two circles C1 with radius r1, central coordinate (x1, y1) and C2 with radius r2 and central coordinate (x2, y2). Go to the editor Write a Python program to test the followings -
Input numbers (real numbers) are separated by a space. Input x1, y1, r1, x2, y2, r2: 5 4 2 3 9 2 C1 and C2 do not overlap Input x1, y1, r1, x2, y2, r2: 5 4 3 5 10 3 Circumference of C1 and C2 will touch Input x1, y1, r1, x2, y2, r2: 6 4 3 10 4 2 Circumference of C1 and C2 intersect Input x1, y1, r1, x2, y2, r2: 5 4 3 5 4 2 C2 is in C1 Input x1, y1, r1, x2, y2, r2: 5 4 2 5 4 3 C1 is in C2 Click me to see the sample solution 46. Write a Python program to that reads a date (from 2016/1/1 to 2016/12/31) and prints the day of the date. Jan. 1, 2016, is Friday. Note that 2016 is a leap year. Go to the editor 47. Write a Python program which reads a text (only alphabetical characters and spaces.) and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters. Go to the editor Note: A word is a sequence of letters which is separated by the spaces. Input:A text is given in a line with following condition: a. The number of letters in the text is less than or equal to 1000. b. The number of letters in a word is less than or equal to 32. c. There is only one word which is arise most frequently in given text. d. There is only one word which has the maximum number of letters in given text. Input text: Thank you for your comment and your participation. Output: your participation. Click me to see the sample solution 48. Write a Python program that reads n digits (given) chosen from 0 to 9 and prints the number of combinations where the sum of the digits equals to another given number (s). Do not use the same digits in a combination. Go to the editor 49. Write a Python program which reads the two adjoined sides and the diagonal of a parallelogram and check whether the parallelogram is a rectangle or a rhombus. Go to the editor 50. Write a Python program to replace a string "Python" with "Java" and "Java" with "Python" in a given string. Go to the editor 51. Write a Python program to find the difference between the largest integer and the smallest integer which are created by 8 numbers from 0 to 9. The number that can be rearranged shall start with 0 as in 00135668. Go to the editor 52. Write a Python program to compute the sum of first n given prime numbers. Go to the editor 53. Write a Python program that accept an even number (>=4, Goldbach number) from the user and create a combinations that express the given number as a sum of two prime numbers. Print the number of combinations. Go to the editor 54. if you draw a straight line on a plane, the plane is divided into two regions. For example, if you pull two straight lines in parallel, you get three areas, and if you draw vertically one to the other you get 4 areas. 55. There are four different points on a plane, P(xp,yp), Q(xq, yq), R(xr, yr) and S(xs, ys). Write a Python program to test AB and CD are orthogonal or not. Go to the editor 56. Write a Python program to sum of all numerical values (positive integers) embedded in a sentence. Go to the editor 57. There are 10 vertical and horizontal squares on a plane. Each square is painted blue and green. Blue represents the sea, and green represents the land. When two green squares are in contact with the top and bottom, or right and left, they are said to be ground. The area created by only one green square is called "island". For example, there are five islands in the figure below. 58. When character are consecutive in a string , it is possible to shorten the character string by replacing the character with a certain rule. For example, in the case of the character string YYYYY, if it is expressed as # 5 Y, it is compressed by one character. 59. A convex polygon is a simple polygon in which no line segment between two points on the boundary ever goes outside the polygon. Equivalently, it is a simple polygon whose interior is a convex set. In a convex polygon, all interior angles are less than or equal to 180 degrees, while in a strictly convex polygon all interior angles are strictly less than 180 degrees. 60. Internet search engine giant, such as Google accepts web pages around the world and classify them, creating a huge database. The search engines also analyze the search keywords entered by the user and create inquiries for database search. In both cases, complicated processing is carried out in order to realize efficient retrieval, but basics are all cutting out words from sentences. 61. Arrange integers (0 to 99) as narrow hilltop, as illustrated in Figure 1. Reading such data representing huge, when starting from the top and proceeding according to the next rule to the bottom. Write a Python program that compute the maximum value of the sum of the passing integers. Go to the editor 62. Write a Python program to find the number of combinations that satisfy p + q + r + s = n where n is a given number <= 4000 and p, q, r, s in the range of 0 to 1000. Go to the editor 63. Write a Python program which adds up columns and rows of given table as shown in the specified figure. Go to the editor 64. Given a list of numbers and a number k, write a Python program to check whether the sum of any two numbers from the list is equal to k or not. Go to the editor 65. In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements. For example, the sequence (A,B,D) is a subsequence of (A,B,C,D,E,F) obtained after removal of elements C, E, and F. The relation of one sequence being the subsequence of another is a preorder. 66. From Wikipedia, the free encyclopaedia: 67. From Wikipedia, 68. Write a Python program to count the number of prime numbers less than a given non-negative number. Go to the editor 69. In abstract algebra, a group isomorphism is a function between two groups that sets up a one-to-one correspondence between the elements of the groups in a way that respects the given group operations. If there exists an isomorphism between two groups, then the groups are called isomorphic. 70. Write a Python program to find the longest common prefix string amongst a given array of strings. Return false If there is no common prefix. 71. Write a Python program to reverse only the vowels of a given string. Go to the editor 72. Write a Python program to check whether a given integer is a palindrome or not. Go to the editor 73. Write a Python program to remove the duplicate elements of a given array of numbers such that each element appear only once and return the new length of the given array. Go to the editor 74. Write a Python program to calculate the maximum profit from selling and buying values of stock. An array of numbers represent the stock prices in chronological order. Go to the editor 75. Write a Python program to remove all instances of a given value from a given array of integers and find the length of the new array. Go to the editor 76. Write a Python program to find the starting and ending position of a given value in a given array of integers, sorted in ascending order. Go to the editor 77. The price of a given stock on each day is stored in an array. 78. Write a Python program to print a given N by M matrix of numbers line by line in forward > backwards > forward >... order. Go to the editor 79. Write a Python program to compute the largest product of three integers from a given list of integers. Go to the editor 4000 8 120Click me to see the sample solution 80. Write a Python program to find the first missing positive integer that does not exist in a given list. Go to the editor 4 3 8 4Click me to see the sample solution 81. Write a Python program to randomly generate a list with 10 even numbers between 1 and 100 inclusive. Go to the editor [4, 22, 8, 20, 24, 12, 30, 98, 28, 48]Click me to see the sample solution 82. Write a Python program to calculate the median from a list of numbers. Go to the editor 83. Write a Python program to test whether a given number is symmetrical or not. Go to the editor 84. Write a Python program that accepts a list of numbers. Count the negative numbers and compute the sum of the positive numbers of the said list. Return these values through a list. Go to the editor 85. From Wikipedia: 86. Write a Python program to count the number of equal numbers from three given integers. Go to the editor 87. Write a Python program to check whether a given employee code is exactly 8 digits or 12 digits. Return True if the employee code is valid and False if it's not. Go to the editor 88. Write a Python program that accept two strings and test if the letters in the second string are present in the first string. Go to the editor 89. Write a Python program to compute the sum of the three lowest positive numbers from a given list of numbers. Go to the editor 90. Write a Python program to replace all but the last five characters of a given string with "*" and returns the new string. Go to the editor 91. Write a Python program to count the number of arguments in a given function. Go to the editor 92. Write a Python program to compute cumulative sum of numbers of a given list. Go to the editor 93. Write a Python program to find the middle character(s) of a given string. If the length of the string is even return the two middle characters. If the length of the string is odd, return the middle character. Go to the editor 94. Write a Python program to find the largest product of the pair of adjacent elements from a given list of integers. Go to the editor 95. Write a Python program to check whether every even index contains an even number and every odd index contains odd number of a given list. Go to the editor 96. Write a Python program to check whether a given number is a narcissistic number or not. Go to the editor If you are a reader of Greek mythology, then you are probably familiar with Narcissus. He was a hunter of exceptional beauty that he died because he was unable to leave a pool after falling in love with his own reflection. That's why I keep myself away from pools these days (kidding). Sample Input: (153) (370) (407) (409) (1634) (8208) (9474) (9475) Sample Output: 97. Write a Python program to find the highest and lowest number from a given string of space separated integers. Go to the editor 98. Write a Python program to check whether a sequence of numbers has an increasing trend or not. Go to the editor 99. Write a Python program to find the position of the second occurrence of a given string in another given string. If there is no such string return -1. Go to the editor 100. Write a Python program to compute the sum of all items of a given array of integers where each integer is multiplied by its index. Return 0 if there is no number. Go to the editor 101. Write a Python program to find the name of the oldest student from a given dictionary containing the names and ages of a group of students. Go to the editor 102. Write a Python program to create a new string with no duplicate consecutive letters from a given string. Go to the editor 103. Write a Python program to check whether two given lines are parallel or not. Go to the editor 104. Write a Python program to find a number in a given matrix, which is maximum in its column and minimum in its row. Go to the editor 105. Write a Python program to check whether a given sequence is linear, quadratic or cubic. Go to the editor 106. Write a Python program to test whether a given integer is Pandigital number or not. Go to the editor Sample Output: 107. Write a Python program to check whether a given number is Oddish or Evenish. Go to the editor 108. Write a Python program that takes three integers and check whether the sum of the last digit of first number and the last digit of second number equal to the last digit of third number. Go to the editor 109. Write a Python program find the indices of all occurrences of a given item in a given list. Go to the editor 110. Write a Python program to remove the duplicate numbers from a given list of numbers. Go to the editor 111. Write a Python program to check whether two given circles (given center (x,y) and radius) are intersecting. Return true for intersecting otherwise false. Go to the editor 112. Write a Python program to compute the digit distance between two integers. Go to the editor 113. Write a Python program to reverse all the words which have even length. Go to the editor 114. Write a Python program to print letters from the English alphabet from a-z and A-Z. Go to the editor 115. Write a Python program to generate and prints a list of numbers from 1 to 10. Go to the editor 116. Write a Python program to identify nonprime numbers between 1 to 100 (integers). Print the nonprime numbers. Go to the editor 117. Write a Python program to make a request to a web page, and test the status code, also display the html code of the specified web page. Go to the editor This domain is for use in illustrative examples in documents. You may use this 118. In multiprocessing, processes are spawned by creating a Process object. Write a Python program to show the individual process IDs (parent process, process id etc.) involved. Go to the editor 119. Write a Python program to check if two given numbers are Co Prime or not. Return True if two numbers are Co Prime otherwise return false. Go to the editor 120. Write a Python program to calculate Euclid's totient function of a given integer. Use a primitive method to calculate Euclid's totient function. Go to the editor 121. Write a Python program to create a coded string from a given string, using specified formula. Go to the editor 122. Write a Python program to check if a given string contains only lowercase or uppercase characters. Go to the editor 123. Write a Python program to remove the first and last elements from a given string. Go to the editor 124. Write a Python program to check if a given string contains two similar consecutive letters. Go to the editor 125. Write a Python program to reverse a given string in lower case. Go to the editor 126. Write a Python program to convert the letters of a given string (same case-upper/lower) into alphabetical order. Go to the editor 127. Write a Python program to check whether the average value of the elements of a given array of numbers is a whole number or not. Go to the editor 128. Write a Python program to remove all vowels from a given string. Go to the editor 129. Write a Python program to get the index number of all lower case letters in a given string. Go to the editor 130. Write a Python program to check whether a given month and year contains a Monday 13th. Go to the editor 131. Write a Python program to count number of zeros and ones in the binary representation of a given integer. Go to the editor 132. Write a Python program to find all the factors of a given natural number. Go to the editor 133. Write a Python program to compute the sum of the negative and positive numbers of an array of integers and display the largest sum. Go to the editor 134. Write a Python program to alternate the case of each letter in a given string and the first letter of the said string must be uppercase. Go to the editor 135. Write a Python program to get the Least Common Multiple (LCM) of more than two numbers. Take the numbers from a given list of positive integers. Go to the editor 136. Write a Python program to reverse all the words which have odd length. Go to the editor 137. Write a Python program to find the longest common ending between two given strings. Go to the editor 138. Write a Python program to reverse the binary representation of an given integer and convert the reversed binary number into an integer. Go to the editor 139. Write a Python program to find the closest palindrome number of a given integer. If there are two palindrome numbers in absolute distance return the smaller number. Go to the editor 140. Write a Python program to convert all items in a given list to float values. Go to the editor 141. Write a Python program to get the domain name using PTR DNS records from a given IP address. Go to the editor 142. Write a Python program to check if every consecutive sequence of zeroes is followed by a consecutive sequence of ones of same length in a given string. Return True/False. Go to the editor 143. Write a Python program to print Emojis using unicode characters or CLDR (Common Locale Data Repository ) short names. Go to the editor Click me to see the sample solution 144. Write a Python program to convert integer to string. Go to the editor 145. Write a Python program to find the largest and smallest digit of a given number. Go to the editor 146. A Python list contains two positive integers. Write a Python program to check whether the cube root of the first number is equal to the square root of the second number. Go to the editor 147. A Python list contains three positive integers. Write a Python program to check whether the sum of the digits in each number is equal or not. Return true otherwise false. Go to the editor 148. A Python list contains some positive integers. Write a Python program to count the numbers that are greater than the previous number on the list.Go to the editor 149. Write a Python program that takes a positive integer and create an N x N square filled with the integer N. Display the N x N square.Go to the editor 150. Write a Python program that takes a positive integer and calculate the cube root of the number until the number is less than three. Count the number of steps to complete the said process.Go to the editor Python Code Editor: More to Come ! Do not submit any solution of the above exercises at here, if you want to contribute go to the appropriate exercise page. Test your Python skills with w3resource's quiz Python: Tips of the DayAdvanced Print: Do you want to print multiple values with a user-defined separater? You can use print's sep parameter for that. |