#4169. 字符串比较

字符串比较

题目描述

  算法提高 字符串比较   时间限制:1.0s   内存限制:512.0MB     独立实现标准字符串库的strcmp函数,即字符串比较函数,从键盘输入两个字符串,按字典序比较大小,前者大于后者输出1,前者小于后者输出-1,两者相等输出0。 样例输入: apple one 样例输出:-1 样例输入: hello he样例输出:1 样例输入: hello hello样例输出:0

来源

蓝桥杯 算法提高