Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
congruence modulo equations (together with a simple BigInteger class)Test Case 1: | x = 9 * t1 + 5 | x = 13 * t2 + 7 | x = 15 * t3 + 2 | x = 17 * t4 + 3 | x = 57 * t5 + 47 Solution: x = 188955t + 148532, t=0,1,2,... Test Case 2: | x = 12322234 * t1 + 233224 | x = 2345 * t2 + 234 Solution: x = 28895638730t + 5668460864, t=0,1,2,... Test Case 3: | x = 12322234 * t1 + 233224 | x = 100234244 * t2 + 53452344 Solution: x = 617554904690548t + 285128288385380, t=0,1,2,... Test Case 4: | x = 12322234234 * t1 + 23322434 | x = 2345 * t2 + 234 Solution: x = 28895639278730t + 739357376474, t=0,1,2,... Test Case 5: | x = 12322234234 * t1 + 233224334 | x = 2345 * t2 + 234 Solution: x = 28895639278730t + 21625754305004, t=0,1,2,... Test Case 6: | x = 123 * t1 + 111 | x = 6 * t2 + 2 No solution! |
λ
.NET NoSQL database for rapid development
|