Question
For an integer n, n!=n.(n-1).(n-2). ... 3.2 .1. Then
1! +2!+3!+...+ 100! when divided by 5 leaves remainder _________.Solution
ATQ, Factorials Modulo 5: 1! = 1 → Remainder = 1 2! = 2 → Remainder = 2 3! = 6 → Remainder = 1 (since 6 ≡ 1 mod 5) 4! = 24 → Remainder = 4 (since 24 ≡ 4 mod 5) 5! and beyond → Divisible by 5, so remainder = 0 Sum of Factorials Mod 5 = 1! + 2! + 3! + 4! = 1 + 2 + 1 + 4 = 8 8 mod 5 = 3 Hence, the remainder is 3.
Which of the following is not a supervised learning?
Which is not true for B-Tree?
In the context of ADTs, what does "polymorphism" refer to?
What is a serializable schedule in concurrency control?
Which of the following is an example of a deadlock detection and resolution technique in DBMS?
Which web technology allows web pages to adapt to different screen sizes and devices?
What type of programming language is Python?
Which phase of the software development lifecycle is primarily considered in COCOMO?
What does COCOMO stand for?
In object-oriented programming, what is inheritance?