简单回文串
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Description
所谓回文就是一段文字从头开始读和从尾开始读是一样的,这样的文字就称做回文。输入一个语句,判断这段语句是不是回文,如果是输出“YES”,否则输出“NO”
(语句中可能有空格,也需要读入)
Input
一行字符串,长度小于255
Output
输出“YES”或者“NO”
Sample 1
Input
welcome
Output
NO
Limitation
1s, 32Mb for each test case.
Hint
Free Pascal Code
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end.
C Code
#include <stdio.h>
int main(void)
{
int a, b;
scanf("%d%d", &a, &b);
printf("%d\n", a + b);
return 0;
}
C++ Code
#include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
cout << a + b << endl;
return 0;
}
Python Code
a, b = [int(i) for i in raw_input().split()]
print(a + b)
Java Code
import java.io.*;
import java.util.Scanner;
public class Main {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(a + b);
}
}
Source
Vijos Original