This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $file = file_get_contents($_GET['URL'], "r") or die("Error. File not found"); | |
| $lower = html_entity_decode(strstr($file, "</tr><tr"), ENT_QUOTES); | |
| $line = (explode("</tr>", $lower)); | |
| echo "BEGIN:VCALENDAR\n"; | |
| echo "VERSION:2.0\n"; | |
| echo "PRODID:PHP\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| void exor4(char *destination, const char *source1, const char *source2) | |
| { | |
| *destination &= 0x0F; | |
| for (int i = 0; i < 4; i++) | |
| *destination |= (((*source1 >> (7 - i)) & 1) ^ ((*source2 >> (7 - i)) & 1)) << (7 - i); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print(3 * (999 // 3 + 1) * (999 // 3) // 2 | |
| + 5 * (999 // 5 + 1) * (999 // 5) // 2 | |
| - 15 * (999 // 15 + 1) * (999 // 15) // 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a, b, i, sum = 1, 2, 2, 0 | |
| while b <= 4000000: | |
| if b % 2 == 0: | |
| sum += b | |
| a, b, i = b, a + b, i + 1 | |
| print(sum) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| n = 600851475143 | |
| while n % 2 == 0: | |
| n //= 2 | |
| i = 1 | |
| while n > 1: | |
| i += 2 | |
| while n % i == 0: | |
| n //= i | |
| print(i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for n in range(999, 99, -1): | |
| m = int(str(n) + str(n)[::-1]) | |
| for i in range(999, 99, -1): | |
| if m % i == 0 and len(str(m // i)) == 3: | |
| print(m) | |
| exit() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def gcd(a, b): | |
| if a: | |
| return gcd(b % a, a) | |
| else: | |
| return b | |
| lcm = lambda a, b: a * b // gcd(a, b) | |
| m = 1 | |
| for i in range(2, 21): | |
| m = lcm(m, i) | |
| print(m) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print(((100 + 1) * 100 // 2) ** 2 | |
| - sum([i ** 2 for i in range(1, 101)])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def prime(n): | |
| if n == 1: | |
| return 2 | |
| else: | |
| i = prime(n - 1) | |
| isPrime = False | |
| while not isPrime: | |
| i += 1 | |
| isPrime = True | |
| for j in range(1, n): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def prime(n): | |
| primes = [2] | |
| for k in range(1, n): | |
| i = primes[k - 1] | |
| isPrime = False | |
| while not isPrime: | |
| i += 1 | |
| isPrime = True | |
| for j in range(0, k): | |
| if i % primes[j] == 0: |
OlderNewer