các bác giúp em bài này nhé!Hj
Your teacher has assigned a list of N (1 ≤ N ≤ 100) positive integers I (1 ≤ I ≤ 10^60) for which you must determine their parity (explained in second grade as "Even... or odd?").
Write a program to read in the N integers and print 'even' on a single line for even numbers and likewise 'odd' for odd numbers.
Input from file evenodd.in:
* Line 1: A single integer: N
* Lines 2..N+1: Line j+1 contains Ij, the jth integer to determine even/odd
Output into file evenodd.out:
* Lines 1..N: Line j contains the word 'even' or 'odd', depending on the parity of Ij
evenodd.in evenodd.out
2
1024
5931 even
odd
Câu 4
Với hai chuỗi đầu vào (chỉ bao gồm các chữ cái từ a đến z, chiều dài trong khoảng 1 .. 80), xác định chuỗi overlap lớn nhất giữa hai chuỗi. Một chuỗi là overlap giữa hai chuỗi nếu nó là một tiền tố của một chuỗi và hậu tố là một chuỗi khác.
Ví dụ xem xét hai chuỗi:
moyooyoxyzooo
yzoooqyasdfljkamo
'yzooo' là một chuỗi overlap. 'mo' cũng là một chuỗi overlap. Chuỗi overlap lớn nhất là 'yzooo' với độ dài 5.
Input file echo.in:
* Dòng 1..2: Mỗi dòng có một chuỗi.
Output file echo.out:
* Dòng 1: Một dòng duy nhất với một số nguyên duy nhất đó là chiều dài của chuỗi overlap dài nhất.
echo.in echo.out
abcxxxxabcxabcd
abcdxabcxxxxabcx 11
'abcxxxxabcx' là một tiền tố của chuỗi đầu tiên và là của hậu tố chuỗi thứ hai.