We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Cutting Paper Squares
Cutting Paper Squares
+ 0 comments public static long solve(int a, int b) { // Write your code here long m = a; long n = b; long ans = Math.min(((m-1)*n+(n-1)),((n-1)*m+(m-1))); return m*n-1; }
+ 0 comments Can any one help me to make a such discussion portal on my site https://haireel.com/ that can help me to solve my mathematical problems because I am a teacher I have to face many such problems daily.
+ 0 comments MyPascoConnect is an online platform used by Pasco County Schools in Florida, USA, to provide various educational services and resources to students, teachers, and parents. MyPascoConnect offers a centralized portal that allows users to access several tools and applications related to education.
+ 0 comments code in c:
long solve(int n, int m) {
return (long) n*m-1;
}
+ 0 comments if u don't want to use function then remove all the code given and type the following python code:
for taking 2 inputs n and m u can also use int() instead of eval()
n,m=map(eval,input().split()
logic:
print(n*m-1)
Load more conversations
Sort 164 Discussions, By:
Please Login in order to post a comment