天天看點

P2241 統計方形(資料加強版)-- 70分 python3實作

統計方形(資料加強版) - 洛谷

"""

P2241 統計方形(資料加強版)-- 70分 python3實作
https://www.luogu.com.cn/problem/P2241

"""

sum1=0

sum2=0

n,m=map( int,input().split() )

for i in range(1,n+1 ):
            for j in range(1, m+1 ):

                        sum1+=min(i,j)
                        sum2+=i*j
                        

print(sum1,end=" ")

print(sum2-sum1)


           

1.9程式設計基礎之順序查找 01查找特定的值 王曙翰(五年級) 2021.12.27 AC

https://blog.csdn.net/dllglvzhenfeng/article/details/122240181

1.9 程式設計基礎之順序查找 01 查找特定的值 scratch

https://blog.csdn.net/dllglvzhenfeng/article/details/122501895

1.9 程式設計基礎之順序查找 02 輸出最高分數的學生姓名 python

https://blog.csdn.net/dllglvzhenfeng/article/details/122471382