浙江省高校计算机等级考试二级Python 程序设计题19——计算周薪|2023备考

笔记整理自B站UPWLB工作生活两不误的个人空间-WLB工作生活两不误个人主页-哔哩哔哩视频教程​​​​​​Python 程序设计题19_哔哩哔哩_bilibili

程序设计题19

 

Python代码

year, time = map(float, input().split())

if time >= 5:
    # 老员工 50
    if time > 40:
        print('{:.2f}'.format(50 * 40 + (time - 40) * 50 * 1.5))
    else:
        print('{:.2f}'.format(50 * time))
else:
    # 新员工 30
    if time > 40:
        print('{:.2f}'.format(30 * 40 + (time - 40) * 30 * 1.5))
    else:
        print('{:.2f}'.format(30 * time))

输入样例

5 40

输出样例

2000.00

猜你喜欢

转载自blog.csdn.net/Raider1/article/details/129975888
今日推荐