PRODUCT - Tích 2 số

View as PDF

Submit solution

Points: 100.00
Time limit: 1.0s
Memory limit: 100M
Input: stdin
Output: stdout

Author:
Problem type
Allowed languages
C, C++, GAS64, Pascal, Perl, PHP, Python, Sed, TCL, Text

Cho hai số nguyên ab. Hãy cho biết tích của ab là số dương, số âm hay số 0.

Dữ liệu

  • Gồm một dòng chứa hai số nguyên ab (10a,b10)

Kết quả

  • Nếu tích của ab dương, hãy in ra 1. Nếu tích của ab âm, hãy in ra 1. Ngượclại,hãy in ra 0.

Ví dụ

Sample Input 1
Copy
6 3
Sample Output 1
Copy
1
Sample Input 2
Copy
0 0
Sample Output 2
Copy
0

Nguồn: Free Contest


Comments

Please read the guidelines before commenting.