diff options
| author | Rishi-k-s <rishikrishna.sr@gmail.com> | 2022-07-04 19:54:29 +0530 |
|---|---|---|
| committer | Rishi-k-s <rishikrishna.sr@gmail.com> | 2022-07-04 19:54:29 +0530 |
| commit | 7a7f6e466286993318dadfc3a8f5281b835cbd2d (patch) | |
| tree | bdb0e7a0fd3f4f4a4f45745ba77ee62031b6310e | |
| parent | 5feeaef6ca72058a86aa3cdb97f43ef36c73a532 (diff) | |
bugs fixed
| -rw-r--r-- | Exam/postmid/session1.py | 0 | ||||
| -rw-r--r-- | TestCodes/basicStufftest.py | 2 | ||||
| -rw-r--r-- | google_example_qn.py | 24 |
3 files changed, 26 insertions, 0 deletions
diff --git a/Exam/postmid/session1.py b/Exam/postmid/session1.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Exam/postmid/session1.py diff --git a/TestCodes/basicStufftest.py b/TestCodes/basicStufftest.py new file mode 100644 index 0000000..af2403d --- /dev/null +++ b/TestCodes/basicStufftest.py @@ -0,0 +1,2 @@ +(name,div,suii,spc) = tuple(map(int,input("Enter name :").split())) +print(name,div,suii,spc)
\ No newline at end of file diff --git a/google_example_qn.py b/google_example_qn.py new file mode 100644 index 0000000..111a0c3 --- /dev/null +++ b/google_example_qn.py @@ -0,0 +1,24 @@ +def test(): + # Read integers N and M from the standard input. + (N, M) = tuple(map(int, input().split())) + # Read N integers from the standard input and save them in the list `C`. + C = list(map(int, input().split())) + # Declare a variable for sum and set it to 0. + sum = 0 + # Loop through the list `C` and sum its values. + for Ci in C: + sum += Ci + # Compute the value of sum modulo M. + modulo = sum % M + # Print the result onto the standard output. + print(modulo) + + +# Read the number of test cases. +T = int(input()) +# Loop over the number of test cases. +for test_no in range(1, T + 1): + # Print case number + print("Case #%d:" % test_no, end=" ") + # and solve each test. + test()
\ No newline at end of file |
