Q1.
def f():
int a[N + 1][M + 1][K + 1]
sum = 0
for i = 1 to N:
for j = i to M:
for k = j to K:
sum += a[i][j]
print(sum)
import { createContext, useContext, ReactNode, useState } from 'react'; | |
// Define the type for user information | |
interface User { | |
id: number; | |
username: string; | |
} | |
// Define the type for the context | |
interface AppContextProps { |
Q1.
def f():
int a[N + 1][M + 1][K + 1]
sum = 0
for i = 1 to N:
for j = i to M:
for k = j to K:
sum += a[i][j]
print(sum)