# Security Encryption Scheme

# Security Encryption Scheme

giacgbj + 2 comments Hint: !

amanish524 + 1 comment Basically u have to find the factorial of the number.

giacgbj + 0 comments I was not asking for an hint ;-) Re-read it.

kd8bny + 0 comments I laughed

bartonstanley + 1 comment To me there is a typo in the following sentence from the problem:

"We can have encryption schemes where 1 can be mapped to 3 or 2 or 1, 2 can be mapped to the remaining two, and 1 can be mapped to the unmapped one."

I think the last instance of "1" should be "3" so that it reads thusly:

"We can have encryption schemes where 1 can be mapped to 3 or 2 or 1, 2 can be mapped to the remaining two, and 3 can be mapped to the unmapped one."

Does anyone else agree?

Fandekasp + 1 comment correct

bartonstanley + 0 comments Thanks for replying, @Fandekasp!

sreedharv + 0 comments ip = int(input()) if ip < 0: print("Input is negative number. Factorial is only for positive numbers and not for negative numbers") elif ip == 0: print("The factorial of 0 is 1") else: op = 1 for i in range(1, ip+1): op = op * i print(op)

cotp0110 + 0 comments python3 solution

def get_fact(n): if n == 1: return 1 return n * get_fact(n-1) n = int(input()) print(get_fact(n))

beansmith013 + 0 comments I have recenlty purchased a new HP laptop and tried to run the program but it is not working I thought that it may the laptop issue so I also contacted hp canada but they told me that there is no fault in the laptop, suggest me the solution.

riju005 + 0 comments A simple factorial calculator.

CooL_codeR97 + 0 comments All you have to calculate is factorial

pjoscely + 0 comments import java.io.

*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*;public class Solution {

`public static void main(String[] args) { /* Compute n! using iteration*/ Scanner sc = new Scanner (System.in); int n = sc.nextInt(); sc.close(); int ans = 1; for (int i = 1; i <= n; i++) { ans*=i; } System.out.println(ans); }`

}

keshavm021 + 0 comments /

*In c it so simple a basic program to do.*/# include

# include

# include

# include

int main() { int i,n,result; scanf("%d",&n); for(i=0;i

choccybikkit + 2 comments Not many of these solutions work for large n ... and cryptography is full of large ns. A real-world input to this problem might have

*M*and*C*representing the possible blocks of say 8 bytes - what's the size of the set of all 64-bit numbers?**18446744073709551616**. Number of bijections?**$VERYBIG**.`Try even 1024 as input ...`

No more comments

Sort 10 Discussions, By:

Please Login in order to post a comment