Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Sandbox

Post History

#2: Post edited by user avatar General Sebast1an‭ · 2021-08-07T10:45:30Z (over 2 years ago)
  • Cops and Robbers: Luhn algorithm
  • Cops and Robbers: Luhn algorithm [cancelled]
  • # Introduction
  • The [Luhn algorithm](http://enwp.org/Luhn_algorithm) is used to verify card numbers. The algorithm in a summary acts like this:
  • ```lang-none
  • Reverse the digits, make an array:
  • 6, 1, 7, 8, 9, 3, 7, 2, 9, 9, 4
  • Double the numbers in odd indexes:
  • 6, 2, 7, 16, 9, 6, 7, 4, 9, 18, 4
  • Sum the digits in each number:
  • 6, 2, 7, 7, 9, 6, 7, 4, 9, 9, 4
  • Sum all of the numbers:
  • 6 + 2 + 7 + 7 + 9 + 6 + 7 + 4 + 9 + 9 + 4 = 70
  • If the sum modulo 10 is 0, then the number is valid:
  • 70 % 10 = 0 => valid
  • ```
  • A challenge of this exists in [CGCC](https://codegolf.stackexchange.com/questions/22/the-luhn-algorithm-for-verifying-credit-card-numbers-etc), but here, let's up the game by playing Cops and Robbers!
  • # Challenge
  • Your task as a cop is to write a program in the language of your choice to apply the Luhn algorithm.
  • - **Input:** Use any form of input for your program, where the supposed variable to be used is either a number or a string.
  • - **Output:** Print out a value or text that shows if the input is verified by the algorithm. Of course, you have to specify what it exactly is. This helps considering this is a code golfing challenge.
  • - Use the language of your choice, but make sure that the program abides to having a hidden language used. The more complicated, the better.
  • - Given this is a code golfing challenge too, make your program as short as possible to make it harder to guess what was used.
  • If you're a robber, crack the program and figure out which language suffices the program. If you get to do so, post it in the robber's thread and notify the cop.
  • 7 days and if no one guessed the language used, the cop gains a point. The challenge will run until the end of the year (Dec. 31, 2021 23:59 (all timezones)). Most points wins, and bonus points for shortest program!
  • # This is now a cancelled sandbox post. This challenge won't be posted on the main for reasons, but thanks for coming to check this out.
  • # Introduction
  • The [Luhn algorithm](http://enwp.org/Luhn_algorithm) is used to verify card numbers. The algorithm in a summary acts like this:
  • ```lang-none
  • Reverse the digits, make an array:
  • 6, 1, 7, 8, 9, 3, 7, 2, 9, 9, 4
  • Double the numbers in odd indexes:
  • 6, 2, 7, 16, 9, 6, 7, 4, 9, 18, 4
  • Sum the digits in each number:
  • 6, 2, 7, 7, 9, 6, 7, 4, 9, 9, 4
  • Sum all of the numbers:
  • 6 + 2 + 7 + 7 + 9 + 6 + 7 + 4 + 9 + 9 + 4 = 70
  • If the sum modulo 10 is 0, then the number is valid:
  • 70 % 10 = 0 => valid
  • ```
  • A challenge of this exists in [CGCC](https://codegolf.stackexchange.com/questions/22/the-luhn-algorithm-for-verifying-credit-card-numbers-etc), but here, let's up the game by playing Cops and Robbers!
  • # Challenge
  • Your task as a cop is to write a program in the language of your choice to apply the Luhn algorithm.
  • - **Input:** Use any form of input for your program, where the supposed variable to be used is either a number or a string.
  • - **Output:** Print out a value or text that shows if the input is verified by the algorithm. Of course, you have to specify what it exactly is. This helps considering this is a code golfing challenge.
  • - Use the language of your choice, but make sure that the program abides to having a hidden language used. The more complicated, the better.
  • - Given this is a code golfing challenge too, make your program as short as possible to make it harder to guess what was used.
  • If you're a robber, crack the program and figure out which language suffices the program. If you get to do so, post it in the robber's thread and notify the cop.
  • 7 days and if no one guessed the language used, the cop gains a point. The challenge will run until the end of the year (Dec. 31, 2021 23:59 (all timezones)). Most points wins, and bonus points for shortest program!
#1: Initial revision by user avatar General Sebast1an‭ · 2021-08-06T04:47:37Z (over 2 years ago)
Cops and Robbers: Luhn algorithm
# Introduction

The [Luhn algorithm](http://enwp.org/Luhn_algorithm) is used to verify card numbers. The algorithm in a summary acts like this:

```lang-none
Reverse the digits, make an array:
    6, 1, 7, 8, 9, 3, 7, 2, 9, 9, 4
Double the numbers in odd indexes:
    6, 2, 7, 16, 9, 6, 7, 4, 9, 18, 4
Sum the digits in each number:
    6, 2, 7, 7, 9, 6, 7, 4, 9, 9, 4
Sum all of the numbers:
    6 + 2 + 7 + 7 + 9 + 6 + 7 + 4 + 9 + 9 + 4 = 70
If the sum modulo 10 is 0, then the number is valid:
    70 % 10 = 0 => valid
```

A challenge of this exists in [CGCC](https://codegolf.stackexchange.com/questions/22/the-luhn-algorithm-for-verifying-credit-card-numbers-etc), but here, let's up the game by playing Cops and Robbers!

# Challenge

Your task as a cop is to write a program in the language of your choice to apply the Luhn algorithm.

- **Input:** Use any form of input for your program, where the supposed variable to be used is either a number or a string.
- **Output:** Print out a value or text that shows if the input is verified by the algorithm. Of course, you have to specify what it exactly is. This helps considering this is a code golfing challenge.
- Use the language of your choice, but make sure that the program abides to having a hidden language used. The more complicated, the better.
- Given this is a code golfing challenge too, make your program as short as possible to make it harder to guess what was used.

If you're a robber, crack the program and figure out which language suffices the program. If you get to do so, post it in the robber's thread and notify the cop.

7 days and if no one guessed the language used, the cop gains a point. The challenge will run until the end of the year (Dec. 31, 2021 23:59 (all timezones)). Most points wins, and bonus points for shortest program!