回复: 9
跳转到指定楼层
上一主题 下一主题
收起左侧

微软70mins OA 和3~5月题目总结

🔗
匿名用户-NX3QD  2022-5-23 11:42:55 |倒序浏览

2022(4-6月) 码农类General 硕士 全职@microsoft - 猎头 - 在线笔试  | 😐 Neutral 🙂 Easy | Pass | 在职跳槽

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
今天的OA

第一题:
There are two wooden sticks of lengths A and B respectively. Each of them can be cut
into shorter sticks of integer lengths. Our goal is to construct the largest possible
square. In order to do this, we want to cut the sticks in such a way as to achieve four
sticks of the same length (note that there can be some leftover pieces). What is the
longest side of square that we can achieve?
Write a function:
def solution(A, B)
that, given two integers A, B, returns the side length of the largest square that we can
obtain. If it is not possible to create any square, the function should return 0.
Examples:
1. Given A = 10, B = 21, the function should return 7. We can split the second stick into
three sticks of length 7 and shorten the first stick by 3.
2. Given A = 13, B = 11, the function should return 5. We can cut two sticks of length 5
from each of the given sticks.
3. Given A = 2, B = 1, the function should return 0. It is not possible to make any square
from the given sticks.
4. Given A = 1, B = 8, the function should return 2. We can cut stick B into four parts.
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies

评分

参与人数 12大米 +32 收起 理由
yudaniu + 1 很有用的信息!
Cypereae + 1 很有用的信息!
babpt + 1 给你点个赞!
bc2615 + 1 给你点个赞!
shixinliu + 2 很有用的信息!

查看全部评分


上一篇:拿了GS 2023伦敦Engineering的暑假
下一篇:拼有趣 MLE 店面
地里匿名用户
🔗
匿名用户-D8XVM  2022-5-26 02:57:19
感谢楼主分享,请问一下楼主oa完多久收到消息呀,已加米,感谢
回复

使用道具 举报

🔗
sa82818 2022-5-26 23:17:55 | 只看该作者
全局:
感謝分享!!
回复

使用道具 举报

🔗
fight520 2022-5-28 10:27:08 | 只看该作者
全局:
多谢分享
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-WIQQL  2022-5-28 22:02:47
请问楼主申请的是什么职位哦? 谢谢~~
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-J82BL  2022-5-30 04:57:01
请问楼主申请的是SDE几,这都是近三个月的OTS题吗?
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-J82BL  2022-5-30 12:30:41
请问VO的时候会考系统设计吗
回复

使用道具 举报

🔗
晓cherry 2022-6-7 07:53:58 | 只看该作者
全局:
感谢分享!!!
回复

使用道具 举报

🔗
rkzheng 2022-6-17 17:13:45 | 只看该作者
全局:
匿名者 发表于 2022-5-29 13:57
请问楼主申请的是SDE几,这都是近三个月的OTS题吗?

我感觉后面的是VO的题吧
回复

使用道具 举报

🔗
HuiVNGC 2022-6-22 05:26:49 | 只看该作者
全局:
感谢分享 谢谢楼主
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表