งาน
มีชุดของตัวเลขที่เป็นx
เช่นว่าแบ่งx^2
7^x-1
งานของคุณคือหาตัวเลขเหล่านี้ รับอินพุตของ n รหัสจะพิมพ์หมายเลขที่ n ตามกฎนี้
ตัวอย่าง 1-index
In Out
3 3
9 24
31 1140
ลำดับที่เกี่ยวข้องสามารถพบได้ ที่นี่
กฎระเบียบ
คำตอบที่สั้นที่สุดจะเป็นผู้ชนะ *
ใช้กฎมาตรฐานการตีกอล์ฟ
ช่องโหว่ไม่อนุญาต
คำตอบของคุณอาจเป็นดัชนี 0 หรือ 1 โปรดระบุในคำตอบของคุณ
n
อะไร ฉันสามารถให้ผลลัพธ์ที่ถูกต้องด้วยn=9
แต่n=10
ทำให้ฉันมีปัญหาอยู่แล้ว
n=10
ให้ฉัน 32; มันเป็นเพราะมันเริ่มใช้ double แทนที่จะเป็นจำนวนเต็มและ mod ผิดหลังจากนั้น :(