UVA 10879 (暑假-数论 -H - Code Refactoring)

#include 

int main() {
	int t, n = 0;
	scanf("%d", &t);
	while (t--) {
		int k, arr[4], count = 0;
		scanf("%d", &k);
		for (int i = 2; count < 3; i++) 
			if (!(k % i))
				arr[count++] = i, arr[count++] = k / i;
		printf("Case #%d: %d = %d * %d = %d * %d\n", ++n, k, arr[0], arr[1], arr[2], arr[3]); 
	}
	return 0;
}

你可能感兴趣的:(数论,ACM,刷题录)