-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8974843
commit fc602c0
Showing
13 changed files
with
111 additions
and
77 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
int N; | ||
std::cin >> N; | ||
|
||
int sum = 238947324; | ||
if (N == 2 || N == 9) { | ||
for (int i = 0; i < 10000; i++) { | ||
sum *= (i+1); | ||
sum += (sum % i); | ||
sum -= i*9123479; | ||
} | ||
} | ||
|
||
if (N == 4) { | ||
int SIZE = 300000000; | ||
int arr[SIZE]; | ||
for (int i = 2; i < SIZE; i++) { | ||
arr[i] = arr[i-1] * arr[i-2] % arr[i-1] + 817; | ||
} | ||
std::cerr << arr[SIZE-1] << std::endl; | ||
} | ||
|
||
if (N == 5 || N == 8) { | ||
N--; | ||
} | ||
|
||
if (N == 7) { | ||
for (int i = 0; i < 800000000; i++) { | ||
sum *= (i+1); | ||
sum += (sum % (i+1)); | ||
sum -= i*9123479; | ||
} | ||
} | ||
|
||
std::cerr << sum; | ||
std::cout << N; | ||
return 0; | ||
} | ||
#include <iostream> | ||
|
||
int main() { | ||
int N; | ||
std::cin >> N; | ||
|
||
int sum = 238947324; | ||
if (N == 2 || N == 9) { | ||
for (int i = 0; i < 10000; i++) { | ||
sum *= (i+1); | ||
sum += (sum % i); | ||
sum -= i*9123479; | ||
} | ||
} | ||
|
||
if (N == 4) { | ||
int SIZE = 300000000; | ||
int arr[SIZE]; | ||
for (int i = 2; i < SIZE; i++) { | ||
arr[i] = arr[i-1] * arr[i-2] % arr[i-1] + 817; | ||
} | ||
std::cerr << arr[SIZE-1] << std::endl; | ||
} | ||
|
||
if (N == 5 || N == 8) { | ||
N++; | ||
} | ||
|
||
if (N == 7) { | ||
for (int i = 0; i < 800000000; i++) { | ||
sum *= (i+1); | ||
sum += (sum % (i+1)); | ||
sum -= i*9123479; | ||
} | ||
} | ||
|
||
std::cerr << sum; | ||
std::cout << N; | ||
return 0; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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