a646. CPE:You can say 11 (UVa 10929)

簡單CPE

時間限制 2000 ms ・ 記憶體限制 256 MB

題目描述

判斷給定的正整數是否為 11 的倍數。數字可能很長,必須完整保留以供輸出。

輸入格式

每行為一個至多 1000 位的正整數。單獨的 0 表示結束,不需處理。

輸出格式

每筆先原樣輸出輸入的數字;若為 11 的倍數,接著輸出 is a multiple of 11.;否則接著輸出 is not a multiple of 11.。數字與 is 之間有一個空白。

來源:UVa 10929 — You can say 11。本敘述依原題規格重新撰寫。

範例測資

範例輸入 1

112233
30800
2937
323455693
5038297
112234
0

範例輸出 1

112233 is a multiple of 11.
30800 is a multiple of 11.
2937 is a multiple of 11.
323455693 is a multiple of 11.
5038297 is a multiple of 11.
112234 is not a multiple of 11.
請先登入後再提交程式碼

討論與題解

載入討論區…

更多