4114. strend

Naive函数字符串普通指针

时间限制:2000 ms

内存限制:512 MiB

题面

Write the function strend(s,t), which returns 11 if the string tt occurs at the end of the string ss, and zero otherwise. Function prototype:

int strend(const char *s,const char *t);
/*
Precondition:
   s points to a string,t points to a string.
Postcondition:
   returns 1 if the string t occurs at the end of the
string s, and zero otherwise
*/

Constants

  • 1s,t201 \leq |s|, |t| \leq 20

样例

输入

abcd
cd

输出

1

输入

abcde
ab

输出

0