ACSL美国计算机科学联赛-Junior Division初级-Contest 2竞赛2-Short Problems短问题

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
2001-2002
American Computer Science League
Junior Division
Short Problems
Contest #2
1. What Does This Program Do - Looping
When the following program is run with X = 20, what is the final value of C?
5. Bit String Flicking
How many different values of X (5 bits long) satisfy the following equation?
ห้องสมุดไป่ตู้00110 OR X = 10110
10 C = 0 20 D = X – 1 30 IF X/D <>INT (X / D ) THEN D = D - 1 ELSE C = D 40 IF C = 0 THEN GOTO 30 50 END
2. Boolean Algebra Simplify completely X ( X Y ) Y (Y Z ) Y
3. Boolean Algebra List all ordered pairs (A, B) that make the following expression TRUE. A AB AB
4. Bit String Flicking Evaluate (LSHIFT 2 (LCIRC 2 (RSHIFT 1 10100 )))
相关文档
最新文档