public void send(String str) {
// TODO Auto-generated method stub
System.out.print("This a sms message:" + str);
}
}
Main test class
public class Main {
public static void main(String[] args){
ISendMethod sender = new SendEmail();
AbstractMessage aMessage = new UrgentMessage(sender);
aMessage.sendMessage("Test");
ISendMethod sender2 = new SendSms();
AbstractMessage aMessage2 = new Co
Blue Bridge cup BASIC 30 factorial calculation (large number), blue bridge basic
[Idea]: This idea basically applies to large numbers. arrays or strings are used, and each number is stored from the beginning in reverse order. Each carry goes to the next position.
[AC code]: Two arrays are reversed.
#include
[AC code 2]: An array.
#include
Team C ++ group A solution report for the sixth session of the Blue Bridge cup individual competition (software), Blue Bridge Software[Question 1]Integer SolutionEquation: a ^ 2 + B ^ 2 + c ^ 2 = 1000(Or see Figure 1.jpg ])Is there an integer solution for this equation? There are: a, B, c = 6, 8, 30 is a group of solutions.Can you work out another suitable solution?Enter the minimum number in the solution.
Blue Bridge cup, official website of Blue Bridge cup
Time limit of the number of input files: 1.0 s memory limit: 256.0 MB
Problem description observation number: 12321,123321 has a common feature, which is the same whether it is left-to-right or right-to-left. This number is called a return number.
This question requires you to find some 5-or 6-digit decimal numbers. The following requirements are met:
Th
Basic exercise of "Blue Bridge Cup": 01 string, Blue Bridge string
Problem description
For a 01 string with a length of 5 digits, each digit may be 0 or 1, a total of 32 possibilities. The first few of them are:
00000
00001
00010
00011
00100
Output these 32 01 strings in ascending order.The input format is not entered. The output format outputs 32 rows. Each row has a 01 string of 5 in ascending ord
Group C/C ++ A of the fourth Blue Bridge cup: revitalize China and blue bridge revitalize China
First, paste the question!
James participated in the fun sports meeting of the school. One of the projects was to skip the grid.
There are some grids painted on the ground, and one word is written in each grid, as shown below: (see Figure 1)
Start from meStart to revitalizeStart zhenxingzhongStart to revitalize C
Blue Bridge Cup C language basic training sequence sorting, blue bridge basic trainingThe Problem description is given a series with a length of n, which is arranged in ascending order. 1 The second row contains n integers, which are the numbers to be sorted. The absolute value of each integer is less than 10000. The output format outputs a row, and the sorted series are output in ascending order. Sample in
Li Bai drinking-blue bridge cup, Li Bai Drinking blue bridge
Li Bai's drinking problems
"Li Bai walked down the street and raised his pot to buy wine. When the shop doubled, he saw flowers and drinks." On the way, he met the shop five times and saw 10 of the flowers. There were two drinks in the pot, in the end, I just need to finish drinking. The last thing I want to meet is flowers. What are the possible
Blue Bridge cup BASIC-13 sequence sorting, blue bridge basic-13
[Idea]: sorting. You can use sort, qsort, or common bubbles.
[AC code ]:
General:
# Include
Bubble:
# Include
Basic exercise letter Graphics of the Blue Bridge cup [classic character questions], Blue Bridge graphics
Basic exercise letter graphics time limit: 1.0 s memory limit: 256.0 MB
Problem description
Using letters to make up some beautiful images, the following is an example:
ABCDEFG
BABCDEF
CBABCDE
DCBABCD
EDCBABC
This is a graph with 5 rows and 7 columns. Please find out the pattern and output a graph wi
Blue Bridge cup basic exercise leap year judgment [basic questions], Blue Bridge leap yearBasic exercise leap-year Judgment time limit: 1.0 s memory limit: 256.0 MBProblem description
For a given year, determine whether the year is a leap year.
This year is a leap year when one of the following conditions is met:
1. The year is a multiple of 4 rather than a multiple of 100;
2. The year is a multiple of
Blue Bridge cup basic exercise 01 string [brute force solution], Blue Bridge string
Basic exercise 01 string time limit: 1.0 s memory limit: 256.0 MB
Problem description
For a 01 string with a length of 5 digits, each digit may be 0 or 1, a total of 32 possibilities. The first few of them are:
00000
00001
00010
00011
00100
Output these 32 01 strings in ascending order.The input format is not entered. The
Full analysis of the sixth blue bridge cup provincial competition JAVA-B, Blue Bridge java-B
Two wrong orders are submitted, and gg is estimated.
Question 1:
I thought of using Helen's formula, and I figured it out. Well, if I subtract a small one, it will be done '''''
Answer: 8x8-(8x4)/2-4x6/2-8x2/2 = 28
Question 2:
Change the cube itselfObserve the following phenomenon. The percentile of a number is sti
1503150049-blue bridge cup-Incorrect tickets for previous questions, answers to previous questions of Blue Bridge cupPrevious exam errors ticket time limit: 1.0 s memory limit: 256.0 MBProblem description
A confidential organization issues a certain ticket and must withdraw it all at the end of the year.
Each ticket has a unique ID number. The IDS of all bills for the year are consecutive, but the IDS start
K-digit problem of Blue Bridge cup, Blue Bridge cupProblem descriptionIf the K-base of a natural number N indicates that any adjacent two digits are not adjacent numbers, then we say that this number is a good K number. Evaluate the number of good K numbers in the K-digit K-number. For example, if K is 4 or L is 2, the number of all K elements is 7, including 11, 13, 20, 22, 30, 31, and 33. Because the numb
Copy CodeThe code is as follows:
/*** Bridging mode** Separate the abstract part from its implementation and use them to change independently*/Abstract class Implementor{Abstract public function operation ();}Class Concreteimplementora extends Implementor{Public Function operation (){echo "Concreteimplementora operation";}}Class Concreteimplementorb extends Implementor{Public Function operation (){echo "Concreteimplementorb operation";}}Class Abstraction{protected $_implementor = null;Public
[Blue Bridge Cup] previous questions ranton ant, Blue Bridge previous questions rantonPrevious questions ranton antTime Limit: 1.0 s memory limit: 256.0 MBProblem descriptionLangton ant, proposed by Chris Langton in 1986, is a type of cellular automation.The square lattice on the plane is filled in black or white. There is an ant in one square ".The head orientation of the ant financial system is: either of
The fourth Blue Bridge cup question-Sloppy formula, the fourth Blue Bridge
EnumerationJames is an acute child. When he was in elementary school, he often copied the questions that the teacher wrote on the blackboard wrong.On one occasion, the instructor gave the Question 36x495 =?He copied: 396x45 =?But the results were dramatic. His answer was correct!Because 36*495 = 396*45 = 17820.There may be many coin
Design Mode: bridge mode; design mode: Bridge
1. Class Diagram
Instance class diagram
2. Create a project
........................
3. Create a Matrix: pixel Matrix class, auxiliary class, and image files of various formats are eventually converted into pixel matrices. different operating systems provide different methods of real pixel matrices.
Namespace BridgeSample
{
Class Matrix
{
// Code omitted
}
}
4
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.