2743: string sentence, etc.View the total time limit for submitting statistics tips: 1000ms memory limit: 65536kB description Determines whether two strings consisting of uppercase and lowercase letters and spaces are equal after ignoring the case and compressing the spaces the input line 1th is the number of groups n for the test data, 2 rows for each set of test
I. Digital testingFormat: N1-op n2Test Operation op:EQ/NE/LE/GE/LT/GT--equals/not equals/less than equals/greater than/less than/greater than1. A numeric comparison can use a special (()) operator, which is closer to the C language, see digital testing.Two. String testS1 = S2 #s1与s2是否相同S1! = S2 #s1与s2是否不相同S1 S1 > S2 #s1是否大于s2-N S1 #s1长度是否大于0-Z S1 #s1长度是否为01. String comparison is greater than less than the s
1. Numerical comparison! /bin/Bashecho"Enter a score:"Read NUM1if[$num 1-ge the]then Echo"Very Good"elif [$num 1-lt the-A $num 1-ge -]then Echo"Good"ElseEcho" Low"fiwhich-eq equals-ne Not equal to-lt less than-le less than or equal to-GT Greater than-ge greater than or equal toEqual equals not equal does not equal less than greater greater thanElif is also the else if-A and-O OR2, ((..)) and [[...]] The useEcho"Enter a score:"Read Num2if(($num 2 >= the) then echo"Very Good"elif [[$num 2-lt the $
PS: This problem just finished, full marks, can refer/* Title: Digital string to binary binary* Description: Enter a string of integers, convert each integer to binary number, if the third bit is "0", then output "0", if "1", then output "1".Topic Category: Bit arithmeticDifficulty: BeginnerScore: 60Operating time limit: Ten SecMemory Limit: MByteStage: Application for examinationInput: A
A comparison of the numerical values
Describe
N1–eq N2
As
N1–GT N2
Greater than
N1–ge N2
Much more than
N1–lt N2
Less than
N1–le N2
As small as
N1–ne N2
Not equal to
string comparison
Describe
STR1 = str2
As
Str1! = str2
Not equal to
STR1
Enter a string to determine if it contains the same substring (string length greater than 1), Output 1, no, output 0.For example 12312 contains two 12, so the output 1;23456 does not have the same sub-sequence, output 0.Input: 12312Output: 1#include Test results, may not be thoughtful, welcome to check the leak:Huawei
above Code for testing. The following code takes only 0.140 seconds. test code 3-time elapsed: 0.140 seconds copy Code the code is as follows: var strarray = new array (); for (VAR I = 0; I var sub = ""; for (VAR J = 0; j sub + = "xxxxxx"; }}
however, the above approach may not be the best! If the information to be submitted is in XML format (in most cases, we can try to group the information to be submitted into XML format ), we can also
Do not spit on the server of Huawei, directly on the textInput: String (English letter), length not exceeding 128Output: The most frequently occurring letterIdeas written in the Notes document/*Input A String * Output the most frequent character * * The thinking: * Using ASCII, count the number of E Ach character * Then find out the max number (max_num) * and it
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.