ソースを参照

remove logs messages

master
flavis 6年前
コミット
c670eeb71a
1個のファイルの変更0行の追加2行の削除
  1. +0
    -2
      ws2019/ipi/uebungen/primfaktorzerlegung.cpp

+ 0
- 2
ws2019/ipi/uebungen/primfaktorzerlegung.cpp ファイルの表示

@@ -6,14 +6,12 @@ int main() {
int k=2; int k=2;
// go until sqrt(n) // go until sqrt(n)
while (k <= sqrt(n)) { while (k <= sqrt(n)) {
printf("searching for dividers for %d, checking %d\n", n, k);
// k is factor of n // k is factor of n
if (n % k == 0) { if (n % k == 0) {
// print out the factor k // print out the factor k
print(k); print(k);
// reset n to the quotient // reset n to the quotient
n = n / k; n = n / k;
printf("found %d, setting n=%d\n", k, n);
// restart at k=2 // restart at k=2
k = 2; k = 2;
} else { } else {


読み込み中…
キャンセル
保存