[ create a new paste ] login | about

Link: http://codepad.org/nfbzepdo    [ raw code | output | fork ]

scwizard - C++, pasted on Feb 13:
#include <iostream>

bool check_result(unsigned int x) {
 if(x % 20 == 0
 && x % 19 == 0
 && x % 18 == 0
 && x % 17 == 0
 && x % 16 == 0
 && x % 15 == 0
 && x % 14 == 0
 && x % 13 == 0
 && x % 12 == 0
 && x % 11 == 0) {
  return true;
 }
 else {
  return false;
 }
}

int main() {
 unsigned int n = 4324319;
 unsigned int result = 0;
 while(n != 0) {
  result = 1396755360 - n*323;
  if(check_result(result)) {
   break;
  }
  --n;
 }
 
 std::cout << result << std::endl;
}


Output:
1
232792560


Create a new paste based on this one


Comments: