88 words
1 minute
TCTT25 Programming: LostCharacter
LostCharacter - Programming Challenge
โจทย์
Challenge นี้เป็นโจทย์ Programming ที่ใช้ Python
ดาวน์โหลดไฟล์
| ไฟล์ | ดาวน์โหลด |
|---|---|
| lost_character.py | 📥 Download |
| output.txt | 📥 Download |
| All Files | 📦 GitHub Folder |
ไฟล์ที่ได้รับ
lost_character.py
import randomchar = [chr(n) for n in range(32, 127)]msg = input('Message: ').strip()file = open('output.txt', 'w')for c in msg: line = [] for n in char: if n != c: line.append(n) random.shuffle(line) file.write(str(line) + '\n')file.close()output.txt
ไฟล์ output.txt มีขนาดใหญ่ สามารถดาวน์โหลดได้จากลิงก์ด้านบน
แนวทางวิเคราะห์
- อ่านโค้ด
lost_character.py- แต่ละบรรทัดมี 94 ตัวอักษร ยกเว้นตัวที่เป็น flag - วิเคราะห์ output.txt - หาตัวอักษรที่หายไปในแต่ละบรรทัด
- เขียน reverse function - หา character ที่ไม่อยู่ในแต่ละ list แล้วต่อกัน
Tools ที่อาจใช้
| Tool | วัตถุประสงค์ |
|---|---|
| Python | รันและแก้โค้ด |
| VS Code | Debug และวิเคราะห์ |
สถานะ
⏳ รอ Writeup - Challenge นี้ยังไม่มี writeup อย่างละเอียดใน repository
Credits
Challenge from TCTT25 | GitHub Repo
TCTT25 Programming: LostCharacter
https://blog.lukkid.dev/posts/tctt25-prog-lostcharacter/