2016-06-27 Problem Solving►UVa UVa 11879 - Multiple of 17 Contents 1. Problem2. Solution3. Code Problem題目網址中文網址 Solution無須理會題目的方式,直接做大數 mod,邊乘邊 mod 17,看最後是否有餘數。 CodeUVa 1187912345678910111213141516171819202122#include<cstdio>int main(){ char str[101]; while (gets(str)) { if (str[0] == '0') break; int mod = 0; for (int i = 0; str[i]; i++) { mod = mod * 10 + str[i] - '0'; mod %= 17; } puts(mod ? "0" : "1"); } return 0;} Newer Uva 821 - Page Hopping Older UVa 11479 - Is this the easiest problem?