PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000008. Nhận biết bội của 11 (You can say 11)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Nhận biết bội của 11 (You can say 11)
You can say 11
Source: UVa
Version: Phuoc Hung OJ Extended
Problem Statement
You are given a potentially very long positive decimal integer as a string. Determine whether it is a multiple of . Preserve the original decimal spelling in the output message.
Input
One line containing decimal string different from 0.
Output
Print N is a multiple of 11. if divisible, otherwise N is not a multiple of 11., with the input string in place of N.
Subtasks
- Subtask 1 (20 points):
- Subtask 2 (30 points):
- Subtask 3 (50 points): ; The string represents a positive decimal integer.
Examples
Input
112233
Output
112233 is a multiple of 11.
Explanation
The alternating digit sums are equal, so their difference is , a multiple of .