جواب «Disclosure or Write-Up?» چالش 6 از جلسهی 62
سؤال
برنامه تصمیم میگیرد یک یافته را چطور منتشر کنی. ورودی سه خط: ctf یا real (معما بود یا سایت واقعی)، fixed یا unfixed، و تعداد روزهای گذشته از گزارش. قاعده: ctf → publish write-up. real و fixed → publish write-up with owner's permission. real و unfixed و روزها کمتر از ۹۰ → keep confidential, remind owner. real و unfixed و روزها ۹۰ یا بیشتر → coordinate with owner; consider public advisory without exploit details.
راهنما
چهار شاخه؛ روزها را int کن.
یک جواب درست
kind = input()
state = input()
days = int(input())
if kind == "ctf":
print("publish write-up")
elif state == "fixed":
print("publish write-up with owner's permission")
elif days < 90:
print("keep confidential, remind owner")
else:
print("coordinate with owner; consider public advisory without exploit details")
اول خودت امتحان کن؛ جوابهای دیگر هم قبول است. برگرد و خودت حلش کن