text:
Permutapalindromic numbers
Given an integer N as input, output the Nth permutapalindromic number.
A permutapalindromic number is a strictly positive integer such that there is at least one permutation of its digits that results in a palindrome (i.e. a number that is its own reverse).
For example, 117 is a permutapalindromic number since its digits can be permuted into 171, which is a palindrome.
We consider that numbers like 10 are not permutapalindromic numbers, even though 01 = 1 is a palindrome. We impose that the palindromic permutation must not have a leading zero (as such, 0 itself is not permutapalindromic).
Numbers that are already palindromes are also permutapalindromic, since permuting nothing is valid.
Inputs and outputs

N may be either 0-indexed or 1-indexed. Please indicate which of the two your answer uses.
The input can be taken through STDIN, as a function argument, or anything similar in your language of choice. The output can be written to STDOUT, returned from a function, or anything similar in your language of choice.
The input and output must be in the decimal base.

Test cases
The following test cases are 1-indexed. Your program must be able to pass any of the test cases presented here in at most 1 minute.
N      Output

1      1
2      2
3      3
4      4
5      5
6      6
7      7
8      8
9      9
10     11
42     181
100    404
128    511
256    994
270    1166

Scoring
This is code-golf, so the shortest answer in bytes wins.

It's quite impossible to not pass the last testcase in one minute...

OEIS A084050 (contains extra cases like 10)

What is the largest input?

@Adám Your program should theoretically work for any number, no matter how big.

Wouldn't it be enough to support numbers that by default are represented in non-exponent form?

@Adám This is a pretty arbitrary limit that is dependant on the language used. Let's say that it should theoretically work for the biggest integer your language can represent by default (so all integers if bignums is the default in your language).

05AB1E, 15 14 13 bytes
Saved a byte thanks to Emigna! Code:
µNœvyJÂïÊP}_½

Explanation:
µ               # c = 0, when c is equal to the input, print N.
 N              # Push N, the iteration variable.
  œ             # Push all permutations of N.
   vyJ    }     # For each permutation...
      Â         #   Bifurcate, which is short for duplicate and reverse.
       ï        #   Convert the seconds one to int, removing leading zeros.
        Q       #   Check if they are not equal.
         P      #   Product of the stack.
           _    # Logical not.
            ½   # Pop a value, if 1 then increase c by 1.

Uses the CP-1252 encoding. Try it online!.

µNœvyJÂïQ}O__½ for 14.

@Emigna Thanks! I didn't think of that.

The ÂïÊ approach doesn't work anymore (since "010" == 10 for N=100 for example), in neither the legacy nor new 05AB1E versions. I assume back in 2016 comparing strings with leading 0s with integers was still giving unequal results, but since in 05AB1E strings/integers are interchangeable, this has been invalid for a while. But, here two 12-byters for both the legacy version: µNœεÂ¬Ā*Q}OĀ and new version: µNDœεÂ¬Ā*Q}à.

Brachylog, 19 bytes
~l<:1at.
.=pPrPl~l?

Try it online!
Takes about 17 seconds for N = 270.
Explanation

Main predicate:
~l            Create a list whose length is Input.
  <           The list is strictly increasing.
   :1a        Apply predicate 1 to each element of the list.
      t.      Output is the last element of the list.

Predicate 1:
.=            Input = Output = an integer
  pPrP        A permutation P of the Output is its own reverse
      l~l?    The length of P is equal to the length of the Input

Pyth, 14
e.ff&_ITshT.p`

Try it here or run a Test Suite
Expansion:
e.ff&_ITshT.p`ZQ   # Auto-fill variables
 .f            Q   # Find the first input number of numbers that give truthy on ...
           .p`Z    # Take all the permutations of the current number
   f&              # Keep those that give a truthy value for both:
     _IT           # Invariance on reversing (is a palindrome)
        shT        # The integer value of the first digit (doesn't start with zero)
                   # A list with any values in it it truthy, so if any permutation matches
                   # these conditions, the number was a permutapalindrome
e                  # Take only the last number

JavaScript (ES6), 99 bytes
f=(n,i=1)=>(n-=/^.0+$/.test(i)</^((.),\2,)*(.)(,\3)?(,(.),\6)*$/.test([...i+''].sort()))?f(n,i+1):i

Explanation:
f=(n,i=1)=>             look for n numbers starting at 1
 (n-=                   test whether current guess is
  /^.0+$/.test(i)<      not a round number and
  /^((.),\2,)*          pairs of comma-separated digits
   (.)(,\3)?            possible single digit
   (,(.),\6)*$/         pairs of comma-separated digits
   .test(               matches the comma-joined
    [...i+''].sort()))  digits in ascending order
 ?f(n,i+1)              if not n numbers found try next number
 :i                     found it!

1100 is a round permutapalindromic number.

@Adám It's not round, it contains at least two nonzero digits.

@Neil: +2 bytes -- you really ought to count the f= when you refer to it later

@charlie Sorry, I always forget to do that.

Brachylog, 21 20 bytes
1 byte thanks to Fatalize.
Did you design the challenge for Brachylog?
:1yt.
0<.={@epcPrP!}

Try it online!
270 takes about half a minute here.
Z = 1166
real    0m27.066s
user    0m26.983s
sys     0m0.030s

Exit code:     0

Predicate 0 (main predicate)
:1yt.
:1y    find the first Input solutions to predicate 1
   t.  unify the output with the last element

Predicate 1 (auxiliary predicate)
0<.={@epcPrP!}
0<.              0 < Output
  .=             Assign a value to Output (choice point)
    {        }   Inline predicate:
     @e              Digits of the Output
       p             A permutation (choice point)
        c            Concatenate (fails if leading zero present)
         P           store as P
          rP         assert that P reversed is still P
            !        remove the choice point in this predicate, so
                     that it will not return twice for the same number.

R, 145 bytes
g=function(n){d=b=0
while(d<n){b=b+1
if(sum(a<-table(strsplit(n<-as.character(b),""))%%2)==nchar(n)%%2&(!names(a)[1]==0|a[1]|sum(!a)>1))d=d+1}
b}

ungolfed
f=function(b){
    a<-table(strsplit(n<-as.character(b),""))%%2
    sum(a)==nchar(n)%%2&(!names(a)[1]==0|a[1]|sum(!a)>1)
}
g=function(n){
    d=b=0
    while(d<n){
         b=b+a
         if(f(b)) d=d+1
    }
    b
}

Essentially -- a function checking membership in permutapalindromic set, and a while loop incrementing until it finds the nth member.

Dyalog APL, 51 bytes
One-indexed.
{⍵⊃{⍵/⍨{(⍵≤9)∨(1<≢c~'0')∧1≥+/2|+⌿c∘.=∪c←⍕⍵}¨⍵}⍳5×⍵}

{ a function where ⍵ represents the argument

⍵⊃{ use the argument to pick from the result of the function

⍵/⍨{ filter the argument with the result of the function

(⍵≤9)∨ the argument is less or equal to 9, OR
(1<≢c~'0')∧ there remains more than one digit when zeros are removed AND
1≥+/ 0 or 1 is the sum of
2| the oddnesses of
+⌿ of the column sums of
c∘.=∪c the comparison table of c and the unique elements of c, where c...
←⍕⍵ is the string representation of the argument

}¨⍵ applied to each of the arguments

}⍳5×⍵ applied to {1, 2, 3, ..., 5 times the argument}

} [end of function]

Finishes all the test cases instantly on TryAPL

Can you prove that a(n) <= 5n?

The second solution generates incorrect results.

The first solution also generates incorrect results.

@LeakyNun Which ones are incorrect? And if 5× isn't enough, there's space for 9×...

@LeakyNun Right, I include 100 etc. which are not allowed.

The problem is not whether 5n is enough for the testcase. The problem is whether you can prove it.

@LeakyNun I think this is enough.

It's quite easy to prove if you want to prove it. You can actually count the numbers roughly.

Python 2.7, 163 154 bytes:
from itertools import*;I,F,Q=input(),[],2
while len(F)'0')for i in permutations(`g`))];Q+=1
print F[-1]

Simple enough. Basically uses a while loop to repeatedly create arrays containing permutapalindromic numbers the the range [1,Q) until Q is large enough such that the array contains Input number of items. It then outputs the last element in that array.
Try It Online! (Ideone)

JavaScript (ES6), 92
n=>eval("for(a=0;n-=(a++<9||(b=[...a+``].sort().join``)>9&!b.replace(/(.)\\1/g,``)[1]););a")

Less golfed
n=>{
  for( a = 0;
       n -= // decrement n (and exit when 0) if the check below is true == a is permutapalindromic
            (a ++ < 9 // single digit (meanwhile, increment a)
             || // or...
             ( b=[...a+``].sort().join`` )// build a string with the digits sorted
               > 9 // required at least 2 non zero digits
             & ! b.replace(/(.)\1/g,``)[1] // removed all digits pair, there must be just 1 or no single digits remaining
            );
     );
   return a;
}

Test

f=n=>eval("for(a=0;n-=(a++<9||(b=[...a+``].sort().join``)>9&!b.replace(/(.)\\1/g,``)[1]););a")

function update() {
  O.textContent=f(+I.value)
}

update()
<input id=I oninput=update() type=number value=100>

Japt, 13 bytes
_ì á fÎdêQ}iU

Try it
0-indexed
_ì á fÎdêQ}iU
_         }iU # Find the N-th number that meets this condition:
 ì            #  Get the digits as an array
   á          #  Get all permutations of that array
     f        #  Keep only permutations where:
      Î       #   The first digit is not zero
       d      #  Return true if any remaining permutation:
        êQ    #   Is a palindrome

Nice! Tried this one earlier but the best I could manage was 14. And then I realised it didn't work!

Perl 6, 66 bytes
{(1..*).grep(*.comb.permutations.grep({+.join.flip eq.join}))[$_]}

0 based
Explanation:
# bare block lambda which takes an implicit parameter ｢$_｣
{
  # all numbers greater than 0
  (1..*)\

  # remove any which aren't permutapalindromic
  .grep(

    # ｢*｣ here starts a Whatever lambda
    *\
    # split into list of digits
    .comb\
    # get all of the permutations of the digits
    .permutations\
    # find out if there are any palindromes
    .grep(

      # another bare block lambda taking ｢$_｣ as implicit parameter
      {
        # compare the current permutation with its reverse stringwise
        # numify only one side to get rid of leading ｢0｣
        +$_.join.flip eq $_.join
      }
    )

  # get the value at the index
  )[$_]
}

Test:
#! /usr/bin/env perl6
use v6.c;
use Test;

my &permutapalindromic = {(1..*).grep(*.comb.permutations.grep({+.join.flip eq.join}))[$_]}

my @tests = (
  1   => 1,
  2   => 2,
  3   => 3,
  4   => 4,
  5   => 5,
  6   => 6,
  7   => 7,
  8   => 8,
  9   => 9,
  10  => 11,
  42  => 181,
  100 => 404,
  128 => 511,
  256 => 994,
  270 => 1166,
);

plan +@tests + 1;

my $start-time = now;
for @tests -> $_ ( :key($input), :value($expected) ) {
  # zero based instead of one based, so subtract 1
  is-deeply permutapalindromic( $input - 1 ), $expected, .gist;
}
my $finish-time = now;

my $total-time = $finish-time - $start-time;

cmp-ok $total-time, &[<], 60, 'Less than 60 seconds for the tests';
diag "$total-time seconds";

Brachylog v2, 16 bytes
<~l<₁{≜.pX↔Xp}ᵐt

Try it online!
Borrows Fatalize's ~l trick because my attempt at a ᵘ-based solution is a bit too slow...
<                   The input is less than
 ~l                 the length of some list
   <₁               which is strictly increasing
     {       }ᵐ     where each element:
      ≜.            is an integer chosen such that
        pX          some permutation X
          ↔X        is X reversed,
            p       a permutation of which is the element.
               t    Output the final element of that list.

Vyxal, 10 9 bytes
SṖ'Ṙ⌊=)ȯt

Try it Online!
You say any test case presented in the challenge should pass in under a minute? All test cases presented in the challenge pass in under 30 seconds. That's what I call gaming (no doubt the other answers do too though lol).
Explained
SṖ'Ṙ⌊=)ȯt
      )ȯ  # Starting at 1, get the first (input)th numbers where:
SṖ        #   From the permutation of the digits of the number,
  '       #   There exists at least 1 such that:
   Ṙ⌊     #   The reverse (cast to int)
     =    #   Equals that permutation
        t # Print the tail of the list

7

@emanresuA that considers 100 to be a valid number, even though it isn't

Gaia, 15 bytes
:vdṙ=
ṙf↑¦Σ
↑#)

Try it online!
First ever code golf, so please tell me if I'm doing anything wrong.
Explained
:vdṙ= # Helper function 2 (hf2)
:     # Push two copies of the function argument
 vdṙ  # str(int(argument[::-1]))
    = # does that equal the original function argument?
-----
ṙf↑¦Σ # Helper function 1 (hf1)
ṙf    # Get all permutations of the string representation of the function argument
  ↑¦  # Map hf2 to each item
    Σ # and summate the result
-----
↑#)   # Main function
↑#    # First (input) items where hf1 is true
  )   # get the last item of that

Welcome to Code Golf, and nice first answer!

@u-ndefined thank you! I really look forward to posting some more code golf answers here!

Javascript (using external library - Enumerable) (142 bytes)
   n=>_.Sequence(n,i=>{l=i+"";p=_.Permutations(_.From(l),l.length).Any(y=>y.First()!="0"&&y.SequenceEqual(y.Reverse()));if(p){return i;}}).Last()

Link to lib:https://github.com/mvegh1/Enumerable/
Code explanation: _.Sequence creates an enumerable for a count of "n" elements, based on the predicate of signature ("i"teration,"a"ccumulated array). Cast the current iteration to a string, and create an enumerable of all permutations from it. Test if any of the permutations satisfy the test of not starting with "0" and that the reversal of the permutation equals the permutation. Return the last element in the sequence because that is the desired output as per OP

Haskell, 89 87 bytes
import Data.List
(filter(any(show.floor.read.reverse>>=(==)).permutations.show)[0..]!!)

Python 2, 93 bytes
S=sorted
f=lambda n,i=1:n and-~f(n-(S(`i`)in[S(`k`)for k in range(9*i)if`k`==`k`[::-1]]),i+1)

1-indexed. Depending on your system, the last test case may exceed the allowed recursion depth.
Does not compute permutations. Instead, uses the fact that two strings are permutations if they are equal when sorted. To test if a number is permutapalindromic, checks if its sorted digits equal the sorted digits of any palindrome up to a bound.

96 bytes:
f=lambda n,i=1:n and-~f(n-(sum(`i`.count(`d`)%2for d in range(10))<2*(set(`i`[1:])!={'0'})),i+1)

1-indexed. Depending on your system, the last test case may exceed the allowed recursion depth.
This doesn't look at permutations and instead uses the following characterization:

A number is permutapalindromic exactly when

At most one of its digits appears an odd number of times, and
It does not have the form d00...00 with one or more zeroes.

This is true because a palindrome must pair off digits from the start and end, except for a possible center digit. The exception comes from the requirement that the leading digit be nonzero, and so some nonzero digit must appear twice unless the number is single-digit.

Jelly, 14 bytes
1DŒ!ŒḂ×ḢƊ€ẸƲ#Ṫ

Try it online!
How it works
1DŒ!ŒḂ×ḢƊ€ẸƲ#Ṫ - Main link. Takes an argument n on the left
           Ʋ   - Group the previous 4 links into a monad f(k):
 D             -   Convert k to digits
  Œ!           -   Permutations of k's digits
        Ɗ€     -   Over each permutation p:
    ŒḂ         -     Is p a palindrome?
      ×Ḣ       -     And is the first digit non-zero?
          Ẹ    -   Is that true for any permutation?
1           #  - Count up k = 1, 2, 3, ... until n k return true under f(k)
                 Return those k
             Ṫ - Return the n'th k

Perl 5 -p, 69 bytes
1while$_-=(join'',sort++$\=~/./g)=~s/(.)\1//gr=~y///c<2*$\!~/^.0+$/}{

Try it online!

Python + golfing-shortcuts, 128 bytes
A port of R. Kap's answer.
from s import*
I,F,Q=e(i()),[],2
while l(F)'0')for I in Im(repr(G)))];Q+=1
p(F[-1])

C, 254 bytes
#define W while
#define R return
f(j){int c=0,a[16]={0};do++a[j%10],++c;W(j/=10);if(c>1&&a[0]>=c-1)R 0;c%=2;W(j<10)if(a[j++]%2&&(!c||++c>2))R 0;R 1;}g(n){int k=0,i=1;W(k<n)if(f(i++))++k;R i-1;}main(a){printf("N>");scanf("%d",&a);printf("%d\n",g(a));}

Jelly, 13 bytes
Dœ^/LỊaṢ-ịø#Ṫ

Try it online!
Out of curiosity, I decided to see how far I could get without actually computing permutations, and two hours of head bashing later it ties caird's existing answer (modulo a golf to use ø). The logic boils down to checking two conditions:

At most one digit occurs an odd number of times.

There must be multiple nonzero digits if at least one digit is zero.

and stuck in a blender for five minutes on high, that's:
           #     Count up collecting the first n integers
          ø      starting from 0 which satisfy:
D                Do the digits
 œ^/             reduced by symmetric multiset difference
    LỊ           have length ≤ 1?
       Ṣ         Sort the digits,
      a          replace them all with 0 if the previous condition is not met,
        -ị       and take the second to last element (wrapping around if length 1),
           #     succeeding if it's nonzero.
            Ṫ    Return the last result.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
A047841: Autobiographical numbers
Definition
Here is the process to describe a number:

For each number from 0 to 9 that is present in the number:
Write down the frequency of that digit and then the digit.

For example, for the number 10213223:

There is 1 occurrence of 0,
2 occurrences of 1,
3 occurrences of 2,
2 occurrences of 3.

Therefore, the number that describes 10213223 is 10213223 (10 from the first property, 21 from the second, etc.).
Note that the number of occurrences of a digit may be greater than 9.
Task
You are to print/output all numbers that describe themselves.
Specs

Standard loopholes apply, except that you are allowed to hardcode the output or store information related to the output in your program.
The numbers in the output can be in any order.
The numbers in the output are allowed to have duplicates.
You may use any separator, if you choose to print instead of output.
You are allowed to prefix and/or postfix output if you choose to print instead of output.
The separator and the prefix and the postfix may not contain any digits (U+0030 to U+0039).
The solution must compute in one day.

Full list (109 items)
22
10213223
10311233
10313314
10313315
10313316
10313317
10313318
10313319
21322314
21322315
21322316
21322317
21322318
21322319
31123314
31123315
31123316
31123317
31123318
31123319
31331415
31331416
31331417
31331418
31331419
31331516
31331517
31331518
31331519
31331617
31331618
31331619
31331718
31331719
31331819
1031223314
1031223315
1031223316
1031223317
1031223318
1031223319
3122331415
3122331416
3122331417
3122331418
3122331419
3122331516
3122331517
3122331518
3122331519
3122331617
3122331618
3122331619
3122331718
3122331719
3122331819
10413223241516
10413223241517
10413223241518
10413223241519
10413223241617
10413223241618
10413223241619
10413223241718
10413223241719
10413223241819
41322324151617
41322324151618
41322324151619
41322324151718
41322324151719
41322324151819
41322324161718
41322324161719
41322324161819
41322324171819
1051322314251617
1051322314251618
1051322314251619
1051322314251718
1051322314251719
1051322314251819
1051322325161718
1051322325161719
1051322325161819
1051322325171819
5132231425161718
5132231425161719
5132231425161819
5132231425171819
5132232516171819
106132231415261718
106132231415261719
106132231415261819
106132231426171819
106132231526171819
613223141526171819
1011112131415161718
1011112131415161719
1011112131415161819
1011112131415171819
1011112131416171819
1011112131516171819
1011112141516171819
1011113141516171819
1111213141516171819
10713223141516271819
101112213141516171819

References

Autobiographical numbers: OEIS A047841
Biographical number: OEIS A047842

I'm fairly sure that this is a dupe... I just can't find the question

Related

gawk, 161 bytes
BEGIN{
    for(split("0 10 2 2 1 1 1 1",a);c=c<11;n=o=_){
        while(++$c>a[c]+1)$(c++)=0;
        for(i in a)n=$i?n$i i-1:n;
        for(i=10;i--;)if(d=gsub(i,i,n))o=d i o;
        if(n==o)print n
    }
}

(line breaks and tabs for clarity)
It's a simple counter which uses the fact that each number has a limited occurrence. For instance is 0 no more than one time in any number, 1 no more than 11 times, 2 no more than 3 times ... and so on.
This way there are only 124415 numbers to check.
It then creates all numbers and checks their validity.
Completes in a few seconds.

dc, 487 bytes
Hardcoded the solution. I start with 22 and add the differences to get the the next numbers. Some returning operations like adding 1 five times in a row are stored in registers.
This is my first program ever written in dc so it can probably golfed a lot more.
[1+d1+d1+d1+d1+d]sa[1+d1+d1+d1+d97+d]sb[1+d1+d99+d1+d100+d]sc[1+d1+d1+d98+dlcx]sd[1+d100+d10000+d]se22d10213201+d98010+d2081+dlax11008995+dlax9800995+dlax208096+dlbxldx999891495+dlax2091108096+dlbxldx10410100909697+dldx30909100909798+dlcx9899+dlex1009999990079798+dlcx10909899+dlex4080909099989899+dlex1091000000+d100999998899089899+d1+d100+d10910000+d10 8^+d50709091 10 10^*+d397888989888989899+dlex10 6^+d10 8^+d10 10^+d10 12^+d1001 10 14^*+d9602010000000100000+d90398989999999900000+f
You can execute the program using dc -e "[solution]", where [solution] is the string above. It outputs the numbers in reverse order. dc -e "[solution]" | sort -n for output in the same order as the list.

Haskell, 157 bytes
c=concat
d!n=['1'..n]>>[d]
r n=['0'..n]
a=r '9'
b s=c[shows n[d]|d<-a,n<-[sum[1|x<-s,x==d]],n>0]
main=print[x|x<-b.c.zipWith(!)a<$>mapM r"1;33222211",x==b x]

Try it online!
Inspired by the gawk answer, this loops over all strings of 0–1 zeros, then 0–11 ones, then 0–3 twos, .... It "biographs" the string (b "01111122" == "105122") and prints that result if is, itself, autobiographical (b x == x).

Ruby, 776 bytes
The rules say that "you are allowed to hardcode the output", so this solution does just that.
x="m|62wkn|65075|651sy|651sz|651t0|651t1|651t2|651t3|cp0ei|cp0ej|cp0ek|cp0el|cp0em|cp0en|ij2wi|ij2wj|ij2wk|ij2wl|ij2wm|ij2wnAh3Ah4Ah5Ah6Ah7AjwAjxAjyAjzAmpAmqAmrApiApjAsb|h1yp02|h1yp03|h1yp04|h1yp05|h1yp06|h1yp07Bc7Bc8Bc9BcaBcbBf0Bf1Bf2Bf3BhtBhuBhvBkmBknBnfFh8Fh9FhaFhbFk1Fk2Fk3FmuFmvFpnC08xC08yC08zC0bqC0brC0ejC81iC81jC84bCfu3EsxkfohEsxkfoiEsxkfojEsxkfraEsxkfrbEsxkfu3Et429yuEt429yvEt42a1nEt42hrf|1ej82kg93hy|1ej82kg93hz|1ej82kg93kr|1ej82kg9baj|1ej832ht8a3|t10qi0rmwpi|t10qi0rmwpj|t10qi0rmwsb|t10qi0y4qzv|t10qi2lo3hn|4nq1gm5kd1grG4p2zeraG4p2zerbG4p2zeu3G4p2zmjvG4p3l25nG4qr4enfG9c4v417|7ojtp0qb1maz|8fxg6lw9mtyj|29e6onjxe94gb|lc7bc5zbz4je3";a="|inj,|1fmye,|enb7ow,|enb7,|acnu,|3ovro98,|7ojtc".split',';b="ABCDEFG";7.times{|i|x.gsub! b[i],a[i]};x.split('|').map{|x|p x.to_i 36}

Ruby, 116 bytes
A much shorter program that takes way too long to run, but given long enough should be able to do it. I do not know if it fits the time constraint.
f=->n{(?0..?9).map{|x|[n.to_s.chars.count{|c|c==x},x]}.select{|a|a[0]>0}.join.to_i}
(10**9).times{|i|p i if i==f[i]}

Come on, it should just take as long time as building the integer partition of 29 (19+10).

///, 542 bytes
/:/\/\///^/13223:!/31:*/
10:#/!223!:&/4^241:$/1819:(/51617:)/
!3!:%/5^142:@/111:-/*@121!:_/51:+/
!123!:=/41:A/617:B/19:C/*!3!:D/18:E/6^1=52:F/
#:G/
2^:H/*5^2:I/1!=($:J/_6:K/
&:L/*&:M/_7/22*2^*!1233C4C5C6C7C8C9G14G15G16G17GDGB+4+5+6+7+8+9)=5)=6)=7)=8)=9)J)M)_8)_9)A)6D)6B)7D)7B)8B*#4*#5*#6*#7*#8*#9F=5F=6F=7F=8F=9FJF_7F_8F_9FAF6DF6BF7DF7BF8BLJLML_8L_9LAL6DL6BL7DL7BL8BK(KJDKJBKMDKMBK5$KADKABK6$K7$*%(*%JD*%JB*%MD*%MB*%5$H(DH(BHJ$HM$
%(D
%(B
%J$
%M$
5^2($*EAD*EAB*E6$*6^142A$*6^152A$
EA$-=(D-=(B-=J$-=_7$-=617$-($*@121=($*@I
@12I*7^1=_627$*@22I

Try it online!
Definitely less than 1440 bytes for sure!!! Uses 28 constants along with the literal, an unusually high amount for ///.

Note that real code starts at 22*2^..., everything before is find & replace patterns.

Husk, 21 20 bytes
f₁N
=⁰dΣf←Ṡzem#d⁰ŀ10

Try it online!
Not sure if it will complete in one day, but it does a straightforward test and filters the infinite list of natural numbers by it. No hardcoding.
Theoretically, it will definitely print all autobiographical numbers, and proceed  to check till the heat death of the universe.
-1 byte after correcting the algorithm.

It seems that the meta consensus is that all submissions must halt: https://codegolf.meta.stackexchange.com/a/4785

It's probably all right if it returns an infinite list, though, right? The only reason it doesn't halt in TIO is because it tries to print that entire list at once.

I think you can come up with an estimate for the runtime. How long does it take to reach 10413223241516? The final number is 10⁷ times larger still, so you would want to reach that number in less than 8.64ms (10⁻⁷ days), which I doubt your code achieves.

@user If it tries to print an infinite list all at once, it will by definition never print anything. Maybe the issue is that stdout is not flushed when the program is terminated on TIO.

Something like "join by lines" might ensure that individual numbers are printed as they are found, but I don't know how you'd do that in Husk (but I'm sure it only costs a byte or two).

@Lynn Yeah, but that's really TIO's fault, I believe

@Razetime Are you sure this is correct?  Exchanging N (infinite list of integers) for ḣ100 (integers from 1 to 100) doesn't seem to output 22...

@DominicvanEssen Yes, it was wrong. Good catch.

Jelly, 34 bytes
DFṢŒrU
3x8“¢¿‘;µ,€"J’$ŒPŒp€ẎḊÇƑƇVV

This program is too slow for TIO, but finished in 2 minutes 8.375 seconds on my computer (thus, less than one day, as required by the question). It can easily be optimized to work on TIO too:
Jelly (Try It Online!), 36 bytes
DFṢŒrU
2x6“¢¿¤¤‘;µ,€"J’$ŒPŒp€ẎḊÇƑƇVV

Try it online! (The footer prints the list of results, plus a count of how many results there are.)
Algorithm
The basic idea is to generate lists of (frequency, number) pairs and then check to see if they correspond to an autobiographical number (by collapsing them into a list of digits, then calculating how many times each digit appears and seeing if it matched the original list of (frequency, number) pairs). We have to generate every list that corresponds to an autobiographical number, but are allowed to also generate extras, as long as we can check and reject them within the time limit.
Any answer has at most one 0, eleven 1s, three 2s, three 3s, and two of any other digit. \$2×12×4×4×3^6=279936\$, a small enough list to check in a minute, so we can just generate all (frequency, number) lists with less than these frequencies to get the TIO version of the program. For the "main" submission, we also generate (useless) lists which can have up to four copies of digits in the 4…9 range, because doing so is slightly shorter to express in Jelly; that's \$2×12×4^8=1572864\$ lists which is still a small enough number to check within a day.
Explanation
Helper function 1Ŀ
The helper function takes an arbitrary list of (frequency, digit) pairs, counts how many times each digit appears within the frequencies and digits, and returns the appropriate list of (frequency, digit) pairs, sorted by the digit.
If this function is run on a list of (frequency, digit) pairs that represent those of an autobiographical number and are sorted by the digit, the output will be the same as the input. Otherwise, the output will differ from the input.
DFṢŒrU
D        Split each number within the frequencies and digits into digits
 F       Recursive flatten, into a flat list of digits
  Ṣ      Sort the list of digits
   Œr    Run-length-encode, into (element, frequency) format
     U   Reverse each interior list, producing (frequency, digit) format

Main program
3x8“¢¿‘;µ,€"J’$ŒPŒp€ẎḊÇƑƇVV
3x8                           [3,3,3,3,3,3,3,3]
       ;                      prepend
   “¢¿‘                       [1,11]
           "                  to each element
          €                     for all numbers from 1 to that element
         ,                      pair that number with
        µ                       the element's
            J’$                 0-based index
               ŒP  €Ỷ         for each subsequence of the resulting list
                 Œp             take its Cartesian product
                     Ḋ        discard the first result (the empty list [])
                        Ƈ     filter the lists, keeping those that
                       Ƒ        are unchanged upon
                      Ç         running the helper function 1Ŀ
                         V    numerical concatenation of frequency with digit
                          V   numerical concatenation of those concatenations

This is mostly very straightforward, with the only confusing part being the various amounts of flattening and unflattening that go on. In particular, the  ŒPŒp€Ẏ portion is the best way I found to write "from these sublists, select one or possibly no elements from each, and concatenate them"; the ŒP chooses which sublists will have no elements selected, the Œp€ selects one element from each of the rest, and the Ẏ collapses the structure which the ŒP introduced.
If there were no time limit…
you could do the task in 13 bytes:
ṢŒrUFV
2*JÇƑƇ

Try it online! (starts the search from just before a valid answer, and returns only 7 answers, so that you can see the program working)
The idea here is to search every possible number from 1 to 21000, returning only those which are autobiographical. Obviously, this won't finish in a reasonable length of time. (The choice of 21000 is mostly arbitrary – it's a number that can be calculated in Jelly using only three bytes. I couldn't find a way to calculate a number large enough using only two.)
I have a suspicion that there are a range of possible answers to this question which make different speed/brevity tradeoffs, so it's probably going to be possible to beat 34 bytes by making a program that takes longer to run but still fits within a single day. It's hard to know exactly where the byte savings should go, though.

Python 2.7 - 684 bytes
o=[22]
i=[[10213223,100096],[21322314,5],[31123314,5],[31331415,404],[1031223314,5],[3122331415,404],[10413223241516,303],[41322324151617,20202],[1051322314251617,202],[1051322325161718,10101],[5132231425161718,10101],[5132232516171819,0],[106132231415261718,101],[106132231426171819,0],[106132231526171819,0],[613223141526171819,0],[1011112131415161718,10101]]
l=[1011112131416171819,1011112131516171819,1011112141516171819,1011113141516171819,1111213141516171819,10713223141516271819,101112213141516171819]
for n in i:
 for x in range(n[0],n[0]+n[1]):
  m="";x=str(x)
  for v in range(10):
   v=str(v);c=x.count(v)
   if c!=0:
    m=m+str(c)+v
    if m==x:o.append(m)
o+=l
print o

Kind of half hard coded and half computed. It takes the approach of splitting the numbers into groups of a manageable size with an upper and lower limit. The list i stores the lower limit and the difference between it and the upper limit as a nested list, All potential candidates are then checked within the range added to the output list o. The last 7 numbers are so far apart that it is cheaper to store them in their own list and add it at the end.
It currently runs in a couple of seconds and obviously increasing the group size would reduce the byte count but increase the run time. Not sure what it would come down to and still be within the one day limit.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Number Plate Golf: Recognition
See also: Parsing
Introduction
You're working on a government programming team, who have been programming the speed cameras. However, the group of people who have programmed the speed calculator have taken up too much space, so you have to make the number plate recognition software as small as possible.
Challenge
Given an image of a number plate, return the text on the plate.
Number plates
The following are all of the characters which your program must recognise:
ABCDEFG

H1JKLMN0

PQRSTUVW

XYZ01234

56789

Note
On British number plates, the characters for I (i) and 1 (one) are the same and the characters for O (o) and 0 (zero) are the same. For that reason, always assume characters are the numbers. I.e. the following number plate is 10 (one zero):

Examples
C0D3 GLF

B3T4 DCY

M1NUS 15

YET1CGN

Other rules
Internet access and OCR libraries and functions are disallowed.
The number plates will always look identical to the ones shown above. All number plates will be roughly same size (there will be some inaccuracies due to cropping method).
If you require lossless PNG versions of any number plates, I will supply them to you.
Scoring
The shortest program in bytes wins.
All number plates are screenshots of the search bar at this site

identical, byte to byte?

@YOU I don't understand the question...

Remind me to drive through your speed trap. (My number plate contains a letter O.)

I asked with the hope of without having to parse images to understand characters, like pattern matching some location of image binaries, nevermind. I actually don't have any clue how to match them.

yes, beta, your 0 and O are exactly the same.....

yes, @tuskiomi, they are.....

Can we expect any scaling, rotation, skewing, shading, or light letters on dark?

@YiminRong No, all number plates will be exactly the same as those in the images in the question

are all of the images the exact same size?

You should add "OCR" or something like that to the title of the challenge so people know what it's about.

Yes, this question's title is pretty inaccurate. How about "OCR a British license plate"?

@Neil My UK number plate has both an O and a 0 and they look identical. There are of course rules to determine which is the correct interpretation, but that would be a whole other challenge.

@LevelRiverSt Indeed, I was thinking of posting it to the Sandbox myself.

It's too bad the characters aren't a fixed width. That could make for some very short code possibilities.

I'd like to have http://i.imgur.com/i8jkCJu.png added to the test cases, if that's possible. ;-)

@YetiCGN Your wish is my command ;)

Thanks! Now I know why they are called "vanity plates". :-D

Do we have to include spaces in our output or is returning just the letters (in order) enough?

@Dave No, spaces are not needed

C, 409 bytes (and I'm as surprised as anybody)
f(w,h,d,X,T,B,x,y,b,v,u,t,a)char*d;{for(x=X=0;++x<w;){for(y=b=h;y--;a=0)d[(y*w+x)*3+1]&224||(b=0,X||(X=x,T=B=y),T=y<T?y:T,B=y>B?y:B);if(X*b){for(B+=1-T,X=x-X,v=5;v--;)for(u=4;u--;a|=(b>X/4*(B/5)*.35)<<19-u*5-v)for(b=0,t=X/4;t--;)for(y=B/5;y--;)b+=!(d[((v*B/5+y+T)*w+x-X+u*X/4+t)*3+1]&224);X=!putchar("g------a----mj---et-u--6----7--8s4-c-x--q--d9xy5-0v--n-2-hw-k-----3---bf-----t-r---pzn-1---l"[a%101-7]);}}}

Takes as input: the width (w) and height (h) of the image, followed by the packed RGB data as an array of chars (d). All the other function parameters are variable declarations in disguise. Ignores everything except the green channel, and applies a threshold of 32 as an initial pass.
Mostly the same as @DavidC's method, except this checks that at least 35% of each sample box is filled. Hopefully that makes it more robust to scale changes, but who knows.
I used a brute-force method to find out which resampling size and coverage percent to use for the best reliability (i.e. fewest cases of one character having multiple interpretations). It turned out that a 4x5 grid with 35% coverage was best. I then used a second brute-force method to calculate the best bit arrangement and modulo value to pack the character data into a short string — the low bit at the top-left, increasing in x then y, with the final value % 101 turned out best, giving this lookup table:
-------g------a----mj---et-u--6----7--8s4-c-x--q--d9xy5-0v--n-2-hw-k-----3---bf-----t-r---pzn-1---l--

Subtracting 7 means the initial -'s can be removed, and the last 2 can be removed without any extra work. This removal means that certain invalid inputs could cause an invalid memory read, so it could segfault on particular images.
Usage:
To get the images into it, I wrote a wrapper using libpng. Also it turns out that despite the filename, the images in the question are actually jpegs (!), so you'll need to manually export them as pngs first.
#include <png.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, const char *const *argv) {
    if(argc < 2) {
        fprintf(stderr, "Usage: %s <file.png>\n", argv[0]);
        return 1;
    }

    const char *file = argv[1];

    FILE *const fp = fopen(file, "rb");
    if(fp == NULL) {
        fprintf(stderr, "Failed to open %s for reading\n", file);
        return 1;
    }

    png_structp png_ptr = png_create_read_struct(
        PNG_LIBPNG_VER_STRING, NULL, NULL, NULL
    );

    if(!png_ptr) {
        fclose(fp);
        fprintf(stderr, "Failed to initialise LibPNG (A)\n");
        return 1;
    }

    png_infop info_ptr = png_create_info_struct(png_ptr);

    if(!info_ptr) {
        png_destroy_read_struct(&png_ptr, NULL, NULL);
        fclose(fp);
        fprintf(stderr, "Failed to initialise LibPNG (B)\n");
        return 1;
    }

    if(setjmp(png_jmpbuf(png_ptr))) {
        png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
        fclose(fp);
        fprintf(stderr, "Error while reading PNG\n");
        return 1;
    }

    png_init_io(png_ptr, fp);
    png_set_sig_bytes(png_ptr, 0);

    png_read_png(
        png_ptr, info_ptr,
        PNG_TRANSFORM_STRIP_16 |
        PNG_TRANSFORM_GRAY_TO_RGB |
        PNG_TRANSFORM_STRIP_ALPHA,
        NULL
    );
    const png_bytep *const rows = png_get_rows(png_ptr, info_ptr);
    const int w = png_get_image_width(png_ptr, info_ptr);
    const int h = png_get_image_height(png_ptr, info_ptr);
    unsigned char *const data = malloc(w*h*3 * sizeof(unsigned char));
    for(int y = 0; y < h; ++ y) {
        for(int x = 0; x < w; ++ x) {
            memcpy(&data[y*w*3], rows[y], w * 3 * sizeof(unsigned char));
        }
    }
    png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
    fclose(fp);

    f(w, h, (char*) data);

    free(data);

    return 0;
}

Breakdown
f(                          // Function
    w,h,d,                  // Parameters: width, height, RGB data
    X,T,B,x,y,b,v,u,t,a     // Variables
)char*d;{                   // K&R syntax to save lots of type decls
  for(x=X=0;++x<w;){        // Loop through each column of the image:
    for(y=b=h;y--;a=0)      //  Loop through pixels in column:
      d[(y*w+x)*3+1]&224||( //   If green < 32: (char could be signed or unsigned)
        b=0,                //    This is not a blank line
        X||(X=x,T=B=y),     //    Start a new character if not already in one
        T=y<T?y:T,          //    Record top of character
        B=y>B?y:B           //    Record bottom of character
      );
    if(X*b){                //  If we just found the end of a character:
      // Check cell grid & record bits into "a"
      for(B+=1-T,X=x-X,v=5;v--;)
        for(u=4;u--;a|=(b>X/4*(B/5)*.35)<<19-u*5-v)
          // Calculate coverage of current cell
          for(b=0,t=X/4;t--;)
            for(y=B/5;y--;)
              b+=!(d[((v*B/5+y+T)*w+x-X+u*X/4+t)*3+1]&224);

      // Look up meaning of "a" in table & print, reset X to 0
      X=!putchar(
        "g------a----mj---et-u--6----7--8s4-c-x--q--d9x"
        "y5-0v--n-2-hw-k-----3---bf-----t-r---pzn-1---l"
        [a%101-7]
      );
    }
  }
}

+1 for beating Python and Mathemetica with freaking C. Oooollllld school, yo.

+1 for WINNING with C, like, never thought that could happen, huh

Mathematica 1170 1270 1096 1059 650 528 570 551 525 498 bytes
The latest version saves 27 bytes by not requiring that the plate be "trimmed" before it is parsed.  The penultimate version saved 26 bytes by using only 10 of the original 24 sample points.
z=Partition;h@i_:=i~PixelValue~#/.{_,_,_,z_}:>⌈z⌉&/@z[{45,99,27,81,63,81,9,63,45,63,9,45,45,45,63,45,45,27,45,9},2];f@p_:=h/@SortBy[Select[p~ColorReplace~Yellow~ComponentMeasurements~{"Image","Centroid"},100<Last@ImageDimensions@#[[2,1]]<120&],#[[2,2,1]]&][[All,2,1]]/.Thread[IntegerDigits[#,2,10]&/@(z[IntegerDigits[Subscript["ekqeuiv5pa5rsebjlic4i5886qsmvy34z5vu4e7nlg9qqe3g0p8hcioom6qrrkzv4k7c9fdc3shsm1cij7jrluo", "36"]],4]/.{a__Integer}:> FromDigits[{a}])-> Characters@"BD54TARP89Q0723Z6EFGCSWMNVYXHUJKL1"]

122 bytes saved through LegionMammal978's idea of packing the long list of base 10 numbers as a single, base 36 number.  He pared another 20 bytes off the final code.
The jump from 528 to 570 bytes was due to additional code to ensure that the order of the letters returned corresponded to the order of the letters on the license plate. The centroid for each letter contains the x-coordinate, which reveals the relative positions of the letters along x.

Ungolfed Code
coordinates=Flatten[Table[{x,y},{y,99,0,-18},{x,9,72,18}],1];
h[img_] :=ArrayReshape[PixelValue[img, #] /. {_, _, _, z_} :>  ⌈z⌉  & /@ coordinates, {6, 4}];
plateCrop[img_]:=ColorReplace[ImageTrim[img,{{100,53},{830,160}}],Yellow];
codes={{{15,13,15,13,13,15},"B"},{{15,8,8,8,9,15},"C"},{{15,13,13,13,13,15},"D"},{{15,8,14,8,8,15},"E"},{{15,8,14,8,8,8},"F"},{{15,8,8,11,9,15},"G"},{{6,6,6,6,15,9},"A"},{{9,9,15,15,9,9},"H"},{{8,8,8,8,8,15},"L"},{{9,15,15,15,13,9},"M"},{{15,9,9,9,9,15},"0"},{{9,10,12,14,10,9},"K"},{{9,13,13,11,11,9},"N"},{{8,8,8,8,8,8},"1"},{{1,1,1,1,9,15},"J"},{{15,9,15,14,8,8},"P"},{{15,9,9,9,15,15},"Q"},{{15,9,15,14,10,11},"R"},{{15,8,12,3,1,15},"S"},{{9,15,6,6,6,6},"V"},{{15,6,6,6,6,6},"T"},{{9,15,15,15,15,15},"W"},{{9,9,9,9,9,15},"U"},{{9,14,6,6,14,9},"X"},{{9,14,6,6,6,6},"Y"},{{15,3,2,4,12,15},"Z"},{{15,9,9,9,9,15},"0"},{{8,8,8,8,8,8},"1"},{{15,1,3,6,12,15},"2"},{{15,1,3,1,9,15},"3"},{{2,6,6,15,2,2},"4"},{{7,12,14,1,1,15},"5"},{{15,8,14,9,9,15},"6"},{{15,1,2,2,6,4},"7"},{{15,9,15,9,9,15},"8"},{{15,9,15,1,9,15},"9"}};
decryptRules=Rule@@@codes;
isolateLetters[img_]:=SortBy[Select[ComponentMeasurements[plateCrop[img],{"Image","Centroid"}],ImageDimensions[#[[2,1]]][[2]]>100&],#[[2,2,1]]&][[All,2,1]]
f[plate_]:=FromDigits[#,2]&/@#&/@h/@isolateLetters[plate]/.decryptRules

Overview
The basic idea is to check whether a systematic sampling of pixels from the input image matches pixels from the same location on the bonafide images.  Much of the code consists of the bit signatures for each character,
The diagram shows the pixels that are sampled from the letters "J", "P","Q", and "R".

The pixel values can be represented as matrices. The dark, bold 1's correspond to black cells. The 0's correspond to white cells.

These are the decryption replacement rules for J  P  Q  R.
{1, 1, 1, 1, 9, 15} -> "J",
{15, 9, 15, 14, 8, 8} -> "P",
{15, 9, 9, 9, 15, 15} -> "Q",
{15, 9, 15, 14, 10, 11} -> "R"
It should be possible to understand why the rule for "0" is:
{15, 9, 9, 9, 9, 15} -> "0"
and thus distinguishable from the letter "Q".

The following shows the 10 points used in the final version.  These points are sufficient for identifying all of the characters.

What the functions do
plateCrop[img] removes the frame and left edge from the plate, makes the background white.  I was able to eliminate this function from the final version by selecting image components, possible letters  that were between 100 and 120 pixels high.

isolateLetters[img] removes the individual letters from the cropped image.
We can display how it works by showing where the cropped image, output from plateCrop goes as input for isolateLetters. The output is a list of individual characters.

Coordinates are 24 evenly distributed positions for checking the pixel color. The coordinates correspond to those in the first figure.
coordinates=Flatten[Table[{x,y},{y,99,0,-18},{x,9,72,18}],1];

{{9, 99}, {27, 99}, {45, 99}, {63, 99}, {9, 81}, {27, 81}, {45,
  81}, {63, 81}, {9, 63}, {27, 63}, {45, 63}, {63, 63}, {9, 45}, {27,
  45}, {45, 45}, {63, 45}, {9, 27}, {27, 27}, {45, 27}, {63, 27}, {9,
  9}, {27, 9}, {45, 9}, {63, 9}}

h converts the pixels to binary.
h[img_] :=ArrayReshape[PixelValue[img, #] /. {_, _, _, z_} :>  ⌈z⌉  & /@ coordinates, {6, 4}];

codes are the signature for each character.  The decimal values are abbreviations of the binary code for black (0) and White (1) cells. In the golfed version, base 36 is used.
codes={{{15, 9, 9, 9, 9, 15}, "0"}, {{8, 8, 8, 8, 8, 8}, "1"}, {{15, 1, 3,6,12, 15}, "2"}, {{15, 1, 3, 1, 9, 15}, "3"}, {{2, 6, 6, 15, 2, 2}, "4"}, {{7, 12, 14, 1, 1, 15},"5"}, {{15, 8, 14, 9, 9, 15}, "6"}, {{15, 1, 2, 2, 6, 4},"7"}, {{15, 9, 15, 9, 9, 15}, "8"}, {{15, 9, 15, 1, 9, 15},"9"}, {{6, 6, 6, 6, 15, 9}, "A"}, {{15, 13, 15, 13, 13, 15}, "B"}, {{15, 8, 8, 8, 9, 15}, "C"}, {{15, 13, 13, 13, 13, 15}, "D"}, {{15, 8, 14, 8, 8, 15}, "E"}, {{15, 8, 14, 8, 8, 8},"F"}, {{15, 8, 8, 11, 9, 15}, "G"}, {{9, 9, 15, 15, 9, 9}, "H"}, {{1, 1, 1, 1, 9, 15}, "J"}, {{9, 10, 12, 14, 10, 9}, "K"}, {{8, 8, 8, 8, 8, 15}, "L"}, {{9, 15, 15, 15, 13, 9}, "M"}, {{9, 13, 13, 11, 11, 9}, "N"}, {{15, 9, 15, 14, 8, 8}, "P"}, {{15, 9, 9, 9, 15, 15}, "Q"}, {{15, 9, 15, 14, 10, 11}, "R"}, {{15, 8, 12, 3, 1, 15}, "S"}, {{15, 6, 6, 6, 6, 6}, "T"}, {{9, 9, 9, 9, 9, 15}, "U"}, {{9, 15, 6, 6, 6, 6}, "V"}, {{9, 15, 15, 15, 15, 15}, "W"}, {{9, 14, 6, 6, 14, 9}, "X"}, {{9, 14, 6, 6, 6, 6}, "Y"}, {{15, 3, 2, 4, 12, 15}, "Z"}};

(* decryptRules are for replacing signatures with their respective character *)
decryptRules=Rule@@@codes;

f is the function that takes an image of a license plate and returns a letter.
f[plate_]:=FromDigits[#,2]&/@#&/@h/@isolate[plateCrop@plate]/.decryptRules;

{"A", "B", "C", "D", "E", "F", "G"}
{"H", "1", "J", "K", "L", "M", "N", "0"}
{"P", "Q", "R", "S", "T", "U", "V", "W"}
{"X", "Y", "Z", "0", "1", "2", "3", "4"}
{"5", "6", "7", "8", "9"}

Golfed
The code is shortened by using a single decimal number to represent all 24 bits (white or black) for each character. For example, the letter "J" uses the following replacement rule: 1118623 -> "J".
1118623 corresponds to
IntegerDigits[1118623 , 2, 24]

{0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1,
  1}
which can be repackaged as
ArrayReshape[{0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1}, {6, 4}]

{{0, 0, 0, 1}, {0, 0, 0, 1}, {0, 0, 0, 1}, {0, 0, 0, 1}, {1, 0, 0,
  1}, {1, 1, 1, 1}}
which is simply the matrix for "J" that we saw above.
%//MatrixForm

Another savings comes from representing the alphabet as "0123456789ABCDEFGHJKLMNPQRSTUVWXYZ" rather than as a list of letters.
Finally, all of the functions from the long version, except h, were integrated into the function f rather than defined separately.

h@i_:=ArrayReshape[i~PixelValue~#/.{_,_,_,z_}:>⌈z⌉&/@Join@@Table[{x,y},{y,99,0,-18},{x,9,72,18}],{6,4}];f@p_:=#~FromDigits~2&/@(Join@@@h/@SortBy[Select[p~ImageTrim~{{100,53},{830,160}}~ColorReplace~Yellow~ComponentMeasurements~{"Image","Centroid"},Last@ImageDimensions@#[[2,1]]>100&],#[[2,2,1]]&][[;;,2,1]])/.Thread[IntegerDigits[36^^1c01agxiuxom9ds3c3cskcp0esglxf68g235g1d27jethy2e1lbttwk1xj6yf590oin0ny1r45wc1i6yu68zxnm2jnb8vkkjc5yu06t05l0xnqhw9oi2lwvzd5f6lsvsb4izs1kse3xvx694zwxz007pnj8f6n,8^8]->Characters@"J4A51LUHKNYXVMW732ZTCGSFE60Q98PRDB"]

@DavidC Seems like SE messed it up; try replacing {1118623, 2518818, ..., 16645599} with this.

@LegionMammal978, your suggestion led to a shortening of the code by over 100 bytes.  I now understand better how Mathematica handles bases.

@DavidC Also, it appears as if some whitespace snuck through to your golfed code, and I count 571 bytes without it. Additionally, some functions can be converted to infix form. x[[All,2,1]] can be replaced with x[[;;,2,1]]. Flatten[x,1] is equivalent to Join@@x, and Flatten[#,1]&/@x is equivalent to Join@@@x. There are a few other minor optimizations that can be done. The 551-byte code after these golfs.

Nice tips and careful reading. Thanks.

Did you attempt to minimize the number of sampling points by moving them around?

Not by moving them around, but instead by using key sampling points to "divide and conquer".  5 bits or points are sufficient to uniquely identify, say, half of the characters.  At least 5 more bits would probably be sufficient for all.  This would likely save some space, but I'm not inclined to follow it through.

I was able to find 12 sampling points that are sufficient for distinguishing, hence identifying, all of the 36 characters.

C#, 1040 1027 bytes
using System;using System.Drawing;class _{static Bitmap i;static bool b(int x,int y)=>i.GetPixel(x,y).GetBrightness()<.4;static char l(int x,int y){if(y<45)return b(x+5,145)?((b(x+30,100)||b(x+30,50))?(b(x+68,94)?(b(x+40,50)?'D':b(x+40,120)?(b(x+45,80)?'M':'N'):'H'):b(x,97)?(b(x+30,140)?'E':b(x+60,70)?(b(x+50,140)?'R':'P'):'F'):b(x+65,45)?(b(x+5,100)?'K':b(x+30,145)?'Z':'X'):'B'):b(x+30,140)?'L':'1'):b(x+30,55)?(b(x+60,70)?'7':'T'):b(x+2,100)?'U':b(x+30,70)?'W':b(x+15,100)?'V':'Y';if(y<70)return b(x+50,110)?(b(x+50,70)?(b(x+10,110)?(b(x+30,100)?(b(x+55,80)?'8':'6'):b(x+55,80)?'0':'G'):b(x+10,70)?(b(x+60,80)?'9':'S'):b(x+60,120)?'3':'2'):'G'):b(x+30,125)?'Q':'C';if(y>150)return'A';if(y>120)return'J';else return b(x+10,135)?'5':'4';}static void Main(string[]z){i=new Bitmap(Console.ReadLine());bool s=true;int w=int.MinValue;for(int x=100;x<800;++x){for(int y=40;y<160;++y)if(s){if(b(x,y)){if(w>50)Console.Write(' ');Console.Write(l(x,y));s=false;goto e;}}else if(b(x,y))goto e;if(!s){s=true;w=0;}else++w;e:continue;}}}

Ungolfed:
using System;
using System.Drawing;

class _
{
    static Bitmap bmp;
    static bool b(int x, int y) => bmp.GetPixel(x, y).GetBrightness() < .4;
    static char l(int x, int y)
    {
        if (y < 45)
            return b(x + 5, 145) ? ((b(x + 30, 100) || b(x + 30, 50)) ? (b(x + 68, 94) ? (b(x + 40, 50) ? 'D' : b(x + 40, 120) ? (b(x + 45, 80) ? 'M' : 'N') : 'H') : b(x, 97) ? (b(x + 30, 140) ? 'E' : b(x + 60, 70) ? (b(x + 50, 140) ? 'R' : 'P') : 'F') : b(x + 65, 45) ? (b(x + 5, 100) ? 'K' : b(x + 30, 145) ? 'Z' : 'X') : 'B') : b(x + 30, 140) ? 'L' : '1') : b(x + 30, 55) ? (b(x + 60, 70) ? '7' : 'T') : b(x + 2, 100) ? 'U' : b(x + 30, 70) ? 'W' : b(x + 15, 100) ? 'V' : 'Y';
        if (y < 70)
            return b(x + 50, 110) ? (b(x + 50, 70) ? (b(x + 10, 110) ? (b(x + 30, 100) ? (b(x + 55, 80) ? '8' : '6') : b(x + 55, 80) ? '0' : 'G') : b(x + 10, 70) ? (b(x + 60, 80) ? '9' : 'S') : b(x + 60, 120) ? '3' : '2') : 'G') : b(x + 30, 125) ? 'Q' : 'C';
        if (y > 150)
            return 'A';
        if (y > 120)
            return 'J';
        if (y > 95)
            return b(x + 10, 135) ? '5' : '4';
        return '-';
    }
    static void Main(string[] args)
    {
        bmp = new Bitmap(Console.ReadLine());
        bool state = true;
        int space = int.MinValue;
        for (int x = 100; x < 800; ++x)
        {
            for (int y = 40; y < 160; ++y)
                if (state)
                {
                    if (b(x, y))
                    {
                        if (space > 50)
                            Console.Write(' ');
                        Console.Write(l(x, y));
                        state = false;
                        goto bad;
                    }
                }
                else if (b(x, y))
                    goto bad;
            if (!state)
            {
                state = true;
                space = 0;
            }
            else
                ++space;
            bad:
            continue;
        }
    }
}

Basically I found some specific reference points to check yellow/black to determine the identity of each character.

Are you sure there is no overfit to the images provided and that it will recognize license plates where the characters are e.g. shifted by 10 pixels?

@YetiCGN it should recognize it so long as the size is the same, and they are in the same vertical position. I have tried with all the provided examples, and it works; please let me know if you find one where it doesn't

I don't want to install Visual Studio just for this, but you can try http://i.imgur.com/i8jkCJu.png which is a bit smaller in size. I think it's safe to assume that all the submissions will be images from that particular website. Initially my comment was more along the lines of "what if it's a real plate scan?" / "what if somebody else shifted all the characters vertically by 10 pixels to make a plate?"

@YetiCGN you shouldn't need VisualStudio to compile, just csc.exe main.cs /r:System.Drawing.dll

PHP – 1741 1674 1143 bytes
It was first set up by learning the profiles of the characters from the first few examples, which then summarized each character into six numbers. I chose six because I originally had five, and it didn't work as great as I'd like, but six seems to work much better. Much of the optimization involves squeezing these profiles into smaller and smaller byte counts.
The first and second profile *lhdfdn and |nnmmkk are actually the blue blob with "GB" at the bottom *, and the right border |, which we're ignoring. It's safer to include them so that the blob and right border have something to match against.
Should handle any image format, any reasonable scaling provided the aspect ratio doesn't change too much, any dark on light color, and even a bit of noise and shading!
It does need the border, at least at the top and bottom, that's part of the profile.
<?php $X=[];foreach(str_split('*lhdfdn|nnmmkkA<njjk;BOnKB`^Chn::E7DHn?1X`EnkGGD4Fn_330!Gnj9G[IHnX!!XnJ%(##knKnX.EN6LnX!!!!Mn_<:bnNn^77_nPn^33@6QhfBDjnRn_8LaDSOlYYnUT$$nn$$Uh_##^nV9c][n;W_nWTlhXHnLTiCY4LhnM5ZJbnmaI0ng88lk1nnnnnn2C[__n`34B?Kna4+=Fnb"5NnUReX6gnKKaM7*4Xnb=8gkIIne9K`KKni',7)as$s){$t=[];foreach(str_split(substr($s,1))as$u)$t[]=ord($u)-11;$X[$s[0]]=$t;}echo m(r($argv[1]),$X)."\n";function r($u){$a=[];$i=imagecreatefromstring(file_get_contents($u));$w=imagesx($i);$h=imagesy($i);$s=[];for($x=0;$x<$w;$x++){$s[$x]=0;for($y=0;$y<$h;$y++){$p=imagecolorsforindex($i,imagecolorat($i,$x,$y));if(3*$p['red']+6*$p['green']+$p['blue']<1280)$s[$x]++;}}$j=0;$k=[];for($x=0;$x<$w;$x++){if($s[$x]>$h/10)for($o=0;$o<6;$o++)$k[]=$s[$x];elseif(count($k)){$a[]=$k;$j++;$k=[];}}$b=[];foreach($a as$v){$t=[];$u=array_chunk($v,intval(count($v)/6));foreach($u as$c)$t[]=array_sum($c)/count($c);$m=99/max($t);$e=[];foreach($t as$x)$e[]=intval($x*$m+0.5);$b[]=$e;}return$b;}function m($A,$X){$r='';foreach($A as$a){$s=INF;$c='';foreach($X as$k=>$x){$t=0;for($i=0;$i<6;$i++)$t+=pow($a[$i]-$x[$i],2);if($s>$t){$s=$t;$c=$k;}}$r.=$c;}return trim($r,'|*');}

Save as ocr.php, then run from the command line:
$ php ocr.php http://i.imgur.com/UfI63md.png
ABCDEFG

$ php ocr.php http://i.imgur.com/oSAK7dy.png
H1JKLMN0

$ php ocr.php http://i.imgur.com/inuIHjm.png
PQRSTUVW

$ php ocr.php http://i.imgur.com/Th0QkhT.png
XYZ01234

$ php ocr.php http://i.imgur.com/igH3ZPQ.png
56789

$ php ocr.php http://i.imgur.com/YfVwebo.png
10

$ php ocr.php http://i.imgur.com/3ibQARb.png
C0D3GLF

$ php ocr.php http://i.imgur.com/c7XZqhL.png
B3T4DCY

$ php ocr.php http://i.imgur.com/ysBgXhn.png
M1NUS15

For those that are interested, here is the learning code. Save as learn.php and run from the command line, no arguments.
<?php

define('BANDS', 6);

main();

function main()
{
    $glyphs = [];

    learn($glyphs, 'http://imgur.com/UfI63md.png', '*ABCDEFG|');
    learn($glyphs, 'http://imgur.com/oSAK7dy.png', '*H1JKLMN0|');
    learn($glyphs, 'http://imgur.com/inuIHjm.png', '*PQRSTUVW|');
    learn($glyphs, 'http://imgur.com/Th0QkhT.png', '*XYZ01234|');
    learn($glyphs, 'http://imgur.com/igH3ZPQ.png', '*56789|');

    $profiles = summarize($glyphs);

    foreach ($profiles as $glyph=>$profile)
    {
        print $glyph;
        foreach ($profile as $value)
            print chr($value + 11);
        print "\n";
    }
}

function learn(&$glyphs, $url, $answer)
{
    $image = imagecreatefromstring(file_get_contents($url));
    $width = imagesx($image);
    $height = imagesy($image);
    $counts = [];
    for ($x = 0; $x < $width; $x++)
    {
        $counts[$x] = 0;
        for ($y = 0; $y < $height; $y++)
        {
            $pixel = imagecolorsforindex($image, imagecolorat($image, $x, $y));
            if (3 * $pixel['red'] + 6 * $pixel['green'] + $pixel['blue'] < 1280)
                $counts[$x]++;
        }
    }

    $index = 0;
    $expanded = [];
    for ($x = 0; $x < $width; $x++)
    {
        if ($counts[$x] > $height / 10)
            for ($inner = 0; $inner < BANDS; $inner++)
                $expanded[] = $counts[$x];
        else if (count($expanded)) {
            $glyphs[$answer[$index]] = $expanded;
            $index++;
            $expanded = [];
        }
    }
}

function summarize($glyphs)
{
    $profiles = [];
    foreach ($glyphs as $glyph=>$expanded)
    {
        $averages = [];
        $bands = array_chunk($expanded, count($expanded) / BANDS);
        foreach ($bands as $band)
            $averages[] = array_sum($band) / count($band);
        $scaling = 99 / max($averages);
        $profile = [];
        foreach ($averages as $average)
            $profile[] = intval($average * $scaling + 0.5);
        $profiles[$glyph] = $profile;
    }
    return $profiles;
}

?>

You should include the spaces in the output

That's not in the specs under The following are all of the characters which your program must recognise, just characters A-H, J-N, P-Z, and 0-9. No mention of spaces.

Oh, okay, yours is fine then

"The first and second profile [...] are actually the blue blob with "GB" at the bottom, and the right border, which we're ignoring." Then why did you include them in the code, especially if the array key with an empty string is overwritten? Plus: It is allowed to use short open syntax for code golf! :-)

@YetiCGN - if they aren't then the code will attempt to match them to something else! I didn't realize they were overwritten, lucky the code still worked. Revising. You might be able to adapt some of my changes to your answer.

True, I found that one of them needs to be there during testing, but barely had enough free time to finish my answer. Nice rewrite, by the way!

You can save even more when you use unique variables for loops and omit the initialization: for(;$i<$w;$i++). pow can be replaced by the ** operator since PHP 5.6 and because Notices are ignored by default, strings can be written as constants without the quotation marks.

PHP, 971 970 bytes
Draws heavily upon Yimin Rong's answer, which can be seriously golfed down, especially the array indices, and put into a Phar with gzip compression.
Download the phar
This is my improved base version at 1557 1535 bytes, saved simply under the filename "o":
<?$X=[[99,92,45,45,97,96],[99,99,99,99,99,99],[56,80,84,84,99,85],[41,55,52,64,99,86],[32,50,59,99,87,23],[67,99,74,71,90,77],[92,99,64,64,86,66],[31,41,77,99,87,50],[92,96,62,62,99,90],[64,85,64,64,99,94],''=>[99,99,98,98,96,96],A=>[49,99,95,95,96,48],B=>[68,99,64,55,85,83],C=>[93,99,47,47,58,44],D=>[61,99,52,38,77,85],E=>[99,96,60,60,57,41],F=>[99,84,40,40,37,22],G=>[99,95,46,60,80,62],H=>[99,77,22,22,77,99],1=>[99,99,99,99,99,99],J=>[26,29,24,24,96,99],K=>[99,77,35,58,67,43],L=>[99,77,22,22,22,22],M=>[99,84,49,47,87,99],N=>[99,83,44,44,84,99],P=>[99,83,40,40,53,43],Q=>[93,91,55,57,95,99],R=>[99,84,45,65,86,57],S=>[68,97,78,78,99,74],T=>[25,25,99,99,25,25],U=>[93,84,24,24,83,99],V=>[46,88,82,80,99,48],W=>[84,99,76,73,97,93],X=>[61,99,65,73,94,56],Y=>[41,65,93,99,66,42],Z=>[63,87,99,98,86,62]];echo m(r($argv[1]),$X);function r($u){$a=[];$i=imagecreatefromstring(join('',file($u)));$w=imagesx($i);$h=imagesy($i);$s=[];for(;$x<$w;$x++){$s[$x]=0;for($y=0;$y<$h;$y++){$p=imagecolorsforindex($i,imagecolorat($i,$x,$y));if(3*$p[red]+6*$p[green]+$p[blue]<1280)$s[$x]++;}}$j=0;$k=[];for(;$z<$w;$z++){if($s[$z]>$h/10)for($o=0;$o<6;$o++)$k[]=$s[$z];elseif(count($k)){$a[]=$k;$j++;$k=[];}}$b=[];foreach($a as$v){$t=[];$u=array_chunk($v,~~(count($v)/6));foreach($u as$c)$t[]=array_sum($c)/count($c);$m=99/max($t);$e=[];foreach($t as$x)$e[]=~~($x*$m+.5);$b[]=$e;}return$b;}function m($A,$X){$r='';foreach($A as$a){$s=INF;$c='';foreach($X as$k=>$x){$t=0;for($i=0;$i<6;)$t+=($a[$i]-$x[$i++])**2;if($s>$t){$s=$t;$c=$k;}}$r.=$c;}return$r;}

Improvements:
1st stage

Numeric array indices removed and reordered the array, string indices as implicit constants

2nd stage

Replaced intval with ~~ (saves 8 bytes, two occurences)
for-loop initialization removed where unnecessary
file_get_contents($u) replaced with join('',file($u)) (saves 5 bytes)
and a few others

Unfortunately, all the second stage improvements only translate into 1 byte less gzipped code. :-D
And this code was used to create the Phar:
<?php
$phar = new Phar('o.phar');
$phar->addFile('o');
$phar['o']->compress(Phar::GZ);
$phar->setStub('<?Phar::mapPhar(o.phar);include"phar://o.phar/o";__HALT_COMPILER();');

Test with php ocr.phar http://i.imgur.com/i8jkCJu.png or any other of the test case images.


text:
Calculate the difficulty of a Code Golf question
Briefing
The difficulty of a Code Golf question can be calculated as such:
$$\text{clamp} \left( \left\lceil \left( \frac v a \div 700 \right) \times 10 \right\rceil, 0, 10 \right)$$
Where \$v\$ is the number of views a question has
and \$a\$ is the number of answers a question has
and \$⌈x⌉\$ is the ceiling operator.
Also:
$$\text{clamp}(x, min, max) = \begin{cases}
min & x < min \\
x   & min \le x \le max \\
max & max < x
\end{cases}$$
This question's current difficulty: ***
Task
Write a program that will take two integers (v and a) and output the difficulty in asterisks (*).
The input can be in the form of an array, a separated string or as separate function arguments
Test Data
Views   Answers Difficulty  Program Output
163     2       2           **
548     22      1           *
1452    24      1           *
1713    37      1           *
4162    32      2           **
3067    15      3           ***
22421   19      10          **********

Example with pseudocode
v: 1713
a: 37
out = clamp(ceil(((v/a)/700)*10), 0, 10); // evaluates to 1
//program will output '*'

The shortest code in bytes wins! Trailing/ leading spaces are allowed.

@SeanBean Trailing spaces allowed?

@LuisMendo Yes.

I find that LaTeX harder to understand that a simple formula string.. but whatever the majority wants I guess..

Will v or a ever be negative?

You should almost add [[tag:underhanded]] for the question being underhanded.

Given the current formula, unanswered questions will always have a difficulty score of 10 (assuming the convention that dividing a positive number by zero gives positive infinity). This feels unfair to me.

This is a Code Golf question. Not an actual system being implemented into the site. Who cares if it's unfair?

Also I don't know if all the answers below actually work with 0 questions.

its kinda early so I may be missing something here, but why /700 * 10 instead of /70?

@KevinL Ssshhhh ;)

@Adám Tag wiki for [tag:underhanded]: This tag exists for historical reasons. New questions of the type previously posted under this tag are not welcome.

What should occur when views and/or answers ==0? (granted, views==0 implies answers==0, but hey).

It doesn't matter really.

@Peanut I know, but here the OP isn't calling for underhanded answers, it is the OP's challenge which is underhanded: SeanBean incredibly manages to fool most (all?) the experienced golfers into writing unnecessarily long code!

You should add a test case where v/a is evenly divisible by 70, e.g., 70, 1, 1.

I was really hoping that this would be a competition for writing code that tries to predict some measure of difficulty based on the text of the question.

@MarkS. I'll try and think of a question based around that idea if you like? Or you can do it yourself :P

How do you build a code to test how hard this question is?...

@DonielF I just edit the question everynow and again, running it through my version of the program.

@Sean That was a failed joke. Apparently you missed the humor in it. Oh well.

@DonielF Care to explain?

Will v or a ever be zero? What should the outputs be in those cases?

JavaScript (ES6), 40 39 bytes
v=>a=>"**********".substring(10-v/a/70)

Because substring provides the required clamping and "ceil"ing behaviour. Edit: Normally I'm too lazy to bother, but because it got 4 upvotes, I've followed @MarsUltor's advice to save 1 byte by currying.

Oh, that is a nice use of substring :-)

Use currying: v=>a=>

Can you use substr instead? I know the second parameter makes a difference, but not sure about the first...

@DomHastings: Yes, though slice would be even shorter.

@DomHastings No, both substr and slice interpret a negative argument as counting back from the end of the string.

Ah of course, I forget they're so different, always assume they're pretty much synonyms. Thanks for confirming!

Ah, I didn't notice it could be negative.

Got it! 37 bytes: v=>a=>"**********".slice(0,v/a/70+.5)

@Yay295 I don't think that works for v=71, a=1.

Dangit, you're right. v=>a=>"**********".slice(0,v/a/70-.5|0+1) fixes that, but it's 41 bytes.

This answer has got four(ty two) upvotes. So you were right to use currying.

I've been wanting to do this for a while...
HTML + CSS 491 487 485 bytes
-4 bytes thanks to Conor O'Brien
-2 bytes thanks to Releasing Helium Nuclei
Input is taken as the width and height of the page window; width being the number of Views, and height being the number of Answers.
<style>p{overflow:hidden;width:1ch}@media(max-aspect-ratio:70/2){p{width:1ch}}@media(max-aspect-ratio:70/3){p{width:2ch}}@media(max-aspect-ratio:70/4){p{width:3ch}}@media(max-aspect-ratio:70/5){p{width:4ch}}@media(max-aspect-ratio:70/6){p{width:5ch}}@media(max-aspect-ratio:70/7){p{width:6ch}}@media(max-aspect-ratio:70/8){p{width:7ch}}@media(max-aspect-ratio:70/9){p{width:8ch}}@media(max-aspect-ratio:7/1){p{width:9ch}}@media(max-aspect-ratio:70/11){p{width:10ch</style><p>**********

You can try it in your browser by entering
data:text/html,<style>p{overflow:hidden;width:1ch}@media(max-aspect-ratio:70/2){p{width:1ch}}@media(max-aspect-ratio:70/3){p{width:2ch}}@media(max-aspect-ratio:70/4){p{width:3ch}}@media(max-aspect-ratio:70/5){p{width:4ch}}@media(max-aspect-ratio:70/6){p{width:5ch}}@media(max-aspect-ratio:70/7){p{width:6ch}}@media(max-aspect-ratio:70/8){p{width:7ch}}@media(max-aspect-ratio:70/9){p{width:8ch}}@media(max-aspect-ratio:7/1){p{width:9ch}}@media(max-aspect-ratio:70/11){p{width:10ch</style><p>**********

as a url in a new tab.

+1 for thinking out of the box – ehm, thinking of the box...

Do you need the closing p tag?

I love how it updates as I change the window's size.

@ConorO'Brien: Good point!

You don't need the last two }s too.

05AB1E, 11 bytes
/70/î'*T×s£

Explanation
/            # divide v by a
 70/         # divide by 70
    î        # round up, call this n
     '*T×    # push 10 asterisks
         s£  # take n up to 10 asterisk
             # implicitly print

Try it online

Javascript (ES6), 37 36 bytes
v=>a=>"*".repeat((v/=a*70)<9?v+1:10)

Saved 1 byte by currying, thanks to TheLethalCoder

let F=
v=>a=>"*".repeat((v/=a*70)<9?v+1:10)

console.log("Test #1:", F(163)(2))    // **
console.log("Test #2:", F(548)(22))   // *
console.log("Test #3:", F(1452)(24))  // *
console.log("Test #4:", F(1713)(37))  // *
console.log("Test #5:", F(4162)(32))  // **
console.log("Test #6:", F(3067)(15))  // ***
console.log("Test #7:", F(22421)(19)) // **********

Can you use v=>a=> instead of (v,a)=>?

@TheLethalCoder - Updated. Thanks!

Doesn't work for v=70, a=1 does it?

@Neil - That's right. It is off by 1 point if the number of answers is an exact divisor of the number of views. Or put in other words, it's anticipating the next view. ;-)

Mathematica, 38 35 bytes
StringRepeat["*",10,⌈#/#2/70⌉]&

Thanks to @MartinEnder for 3 bytes

Hello, and welcome to PPCG! This is a great answer!

@NoOneIsHere Thanks! Originally I was thinking of Clip, which has pretty much the same syntax as OP's Clamp, but then I saw that StringRepeat has the optional third argument for truncation.

There are Unicode characters for the left and right ceiling bracket which together make up only 6 bytes instead of the 9 you need for Ceiling[].

EXCEL, 29 bytes
If you count Excel as a representation of VBA Excel, then you can use
=REPT("*",MIN(1+v/(70*a),10))

where v and a are the name of reference cells.

Hi, and welcome to PPCG! This is a nice first post! And valid also.

Hi too @EasterlyIrk. Thanks for the warm welcome :)

CJam, 18 15 14 bytes
Saved 1 byte thanks to Peter Taylor and 3 bytes thanks to Adnan
'*A*q~d/70/m]<

Try it online
'*A*            e# Push "**********"
    q~d/        e# Get the input and divide the two numbers
        70/     e# Divide by 70
           m]   e# Ceil, yielding x
             <  e# Slice the string, taking the first x elements

C#, 68 49 48 bytes
v=>a=>"**********".Substring((int)(10-v/a/70d));

This is the C# version of this excellent answer by Neil.
Saved another 19 bytes thanks to Neil

Try (int)System.Math.Floor(10-v/a/70) or just (int)(10-v/a/70).

@Neil Looks like I had to leave the 70d alone but works better thanks

Sorry, didn't see the d there.

Another answer that could save one byte with currying, I think: v=>a=>

@BrianMcCutchon Didn't even realise how I could do it in C# thanks

If C# rounding is the same as Java, then when you cast to an integer, it rounds the double, it doesn't use the ceiling operator.

@Advancid Neither language rounds, as far as I know. What makes you think otherwise?

@Neil Sorry I meant remove decimals instead of round.

@Advancid That's why you subtract it from 10 first. 10-ceil(x) == floor(10-x).

Java 8, 57 bytes
Uses a lambda to save bytes, performs the calculation and substrings to return the answer.
(v,a)->"**********".substring(Math.max(0,(700*a-v)/70/a))

Here is my class for testing it.
public class DifficultyCalculator{
    static interface h{ String f(int v, int a);}
    static void g(h H){
        System.out.print(H.f(163,2));System.out.println("\t**");
        System.out.print(H.f(548,22));System.out.println("\t*");
        System.out.print(H.f(1452,24));System.out.println("\t*");
        System.out.print(H.f(1713,37));System.out.println("\t*");
        System.out.print(H.f(4162,32));System.out.println("\t**");
        System.out.print(H.f(3067,15));System.out.println("\t***");
        System.out.print(H.f(22421,19));System.out.println("\t**********");
    }
    public static void main(String[] args) {
        g( // 70
            (v,a)->"**********".substring(java.lang.Math.max(0,(int)(10-v/70d/a)))
        );
    }
}

Update

-3 [16-08-19] Utilized integer division
-10 [16-08-18] Removed unnecessary import, thanks to @OlivierGrégoire!
-18 [16-08-17] Return string instead of print

Nice, a Java answer that isn't a train!

No need for java.lang. since it's the default included package.

You are rounding not ceiling!

@Advancid I tested it and System.out.println((int)2.99); prints 2 and since I take the pre-floored value from 10 and then floor it, it is the same as taking the ceiling away from 10.

MATL, 12 bytes
/70/0:9>42*c

Try it online!
Explanation
The rounding up and clamping are done simultaneously as follows: the number x = v/a/70 is compared against each element of the array [0 1 ... 9]. The numbers of that array that are exceeded by x will become asterisks, and the rest will be spaces.
/      % Take the two numbers implicitly. Divide. (Example: for inputs 3067, 15
       % we get 204.47)
70/    % Divide by 70 (we get 2.92)
0:9    % Push array [0 1  ... 9]
>      % See which of those are exceeded by the previous number (2.92 exceeds
       % 0, 1 and 2, so we get [1 1 1 0 ... 0]). This does the rounding up
       % and the clamping
42*    % Multiply by 42, which is the ASCII code of '*' (we get [42 42 42 0 ... 0])
       % Char 0 will be displayed as space
c      % Convert to char. Implicitly display

Python2, 32 bytes
saved 3 + 2 bytes and corrected off by one error thanks to Leaky Nun
lambda v,a:('*'*10)[:~-v/a/70+1]

similar to Neils answer. Uses the fact that Python2 does integer division.

fails when v=70 and a=1

The f= can be removed

v, a can become v,a

thanks! should work now. May be wrong for v=0, a=1 now, but this case cannot exist, can it?

That would not be wrong for v=0, a=1.

Instead of using (v-1), you can use ~-v.

thanks - no idea how that works

~ is bitwise negation, which turns n to -(n+1). (here for more info)

Why *10 then substring? Multiply with the right amount straight away: lambda v,a:('*'*(~-v/a/70+1))

@KarlNapf beucase ~-v/a/70+1 may generate a number higher than 10 (last test for example)

Haskell, 35 bytes
v#a=[1..min(ceiling$v/a/70)10]>>"*"

[1..min(ceiling$v/a/70)10] creates a range from 1 to the computed difficulty (an empty list for difficulty 0). a>>b repeats the list b length a often.

C#, 97 89 87 77 42 41 bytes
v=>a=>new string('*',(v/=a*70)<9?v+1:10);

Saved 10 bytes thanks to Adám
Saved a few bytes thanks to Arnauld

You can save a whole lot by replacing (int)System.Math.Ceiling(v/a/70d) by (v+69)/(70*a)... Note that moreover v/a can not be negative, so c can be simplified a lot because you don't need to check for that.

Pyth, 17 13 bytes
4 bytes in credit to Luis Mendo for his algorithm.

*\*htS[0T.EccFQ70
*\*s>LccFQ70T

Test suite.

Also 13 bytes.

R,  68, 50 52  bytes
f=function(v,a)cat(rep("*",1+min(v/a/70,10)),sep="")

rep implicitly places a min on number of 0.
Thanks to @plannapus and @Anastasiya-Romanova秀  for spotting my error.

You can remove f=

Outputs of your code are not equal to the Test Data. You should add 2 more bytes 1+ after min( in order to get the same outputs

Perl, 35 32 bytes
say"*"x(10-($-=10-pop()/70/pop))

Use -E to activate say and give the arguments in the reverse order:
perl -E 'say"*"x(10-($-=10-pop()/70/pop))' 2 163

If arguments on STDIN are allowed the following is 29 bytes:
(echo 163; echo 2) | perl -pe '$_="*"x(10-($-=10-$_/70/<>))'

I can't remember if it'd exactly the same, but can you have 0| instead of $-=? (Thinking operator precedence might not be right...)

@DomHastings 0| makes a negative number into a huge number (leading to zero *s), $-= clips to 0 (leading to ten *s), which is what I need here

Ah, of course, it's only ever a positive integer! Thanks for reminding. I'm sure I'll forget that when I need it though...

Pyke, 13 9 bytes
/70/\**T<

Try it here!
Explanation:
/         -    num_1 / num_2
 70/      -   ^ / 70
    \**   -  "*" * ^
       T< - ^[:10]

Javascript ES6, 48 bytes
a=>b=>"*".repeat(Math.ceil(Math.min(a/b/70,10)))

m4, 136 135 bytes
define(r,`ifelse($1,0,,eval($1>9),1,*`r(9)',*`r(decr($1))')')define(f,`r(ifelse(eval($1%($2*70)),0,eval($1/$2/70),eval($1/$2/70+1)))')

Defines a macro f which takes v and a, and expands to the correct output. Most of the program is an implementation of ceiling.

C, 54, 51, 50, 49 bytes
Assuming that v is positive or zero and a positive, the x < min clamping case is never met, since there is no way the result of the ceiling operation can be negative. Additionally, integer maths on non-negative values always yields the floor of the result, so we add 1 to get the ceiling.
This solution requires a write function, works on Linux at least.
F(v,a){write(1,"**********",(v/=a*70)>9?10:v+1);}

Test main:
int main() {
  F(163, 2);
  putchar('\n');
  F(548, 22);
  putchar('\n');
  F(1452, 24);
  putchar('\n');
  F(1713, 37);
  putchar('\n');
  F(4162, 32);
  putchar('\n');
  F(3067, 15);
  putchar('\n');
  F(22421, 19);
  putchar('\n');
}

Replacing (v=v/a/70) with (v/=a*70) saves 1 byte.

Nice catch @ceilingcat!

TI-Basic, 39 bytes
Prompt V,A
sub("**********",1,max(0,min(10,int(V/A/70)+1

javascript: 82 73 bytes
 (v,a)=>console.log("*".repeat(Math.min(Math.max(0,Math.ceil(v/a/70),10)))

saved some bytes after Adám pointed out I overlooked the /700*10=/70, and the removal of parens

@Adám what's with the edit?

@Adám If people read any of the answers they'll have the spoiler already. Rolling back, because currently that sentence is fairly useless and just makes people click on the revision history.

@Adám That's what I usually use myself but I don't see any harm in the current version.

No need to console.log it, returning is fine. You can also save a byte with v=>a=> instead of (v,a)=>

Dyalog APL, 15 bytes
'*'⍴⍨10⌊⌈⎕÷70×⎕

'*'⍴⍨ the character repeated this many times:
10⌊ min(10,...
⎕÷ input divided by
70× seventy times
⎕ input
TryAPL online!

Would it be golfier to use Mendo's algorithm?

@LeakyNun I don't think so: '*'/⍨(⎕÷70×⎕)>⍳10

Jellyfish, 18 bytes
P
#'*
mM/%i
10 %70

Takes input in the format [a v]. Try it online!
Explanation

% is reciprocal, so %70 is 1/70.
i is input, as a two-element array.
/% with inputs i and %70 reduces the array i by flipped division with initial value %70. In other words, it computes v/(a/(1/70)), which is equal to v / (70*a).
M takes the ceiling of this value, and m takes the maximum of that and 10.
#'* repeats the literal * character that many times.
P prints the result without quotes.

MATLAB, 34 33 bytes
Because I like this challange so much, here is one for MATLAB (outputs trailing whitespaces):
@(v,a)[(ceil(v/a/70)>0:9)*42,'']

Inspired by @Luis Mendo's answer. Thanks to @pajonk for saving one byte.

Nice approach! I had a 40-byte one to post... BTW, you can save one byte using [... ''] instead of char(...). And do you really need the ceil when at the end you are comparing with integers?

thanks @pajonk - one can really learn some things on this site to make my code even less readable ;)

dc, 110 108 104 98 bytes
This was a doozy since slicing isn't a thing. Also, dc doesn't manipulate strings. I just really was waiting for a string one that would be < 5 hours of coding. On the plus side, I finally started writing down common constructs, like for loops. Also had to formulate rounding/ceiling, so thanks for that.
[42P]sd[dsi[li0!=dli1-dsi0!=L]dsLx]sl[Isi[li0!=dli1-dsi0!=L]dsLx]sg[1+]saIk/70*0k1~0!=adI>ldI!>gIP

Invoked in bash:
echo 'v a (above)'|dc
# Wholly:
>> echo '163 2 [42P]sd[dsi[li0!=dli1-dsi0!=L]dsLx]sl[Isi[li0!=dli1-dsi0!=L]dsLx]sg[1+]saIk/70*0k1~0!=adI>ldI!>gIP'|dc
# outputs:
**
>>

Replacing (above) with the code, and v and a with their respective counterparts above. The single quotes are important (otherwise you get bash's history stuff).

Explained:
[42P]sd   # Here we store a macro in register d to print 1 * without a newline

[dsi[li0!=dli1-dsi0!=L]dsLx]sl # Store the "less than" case, a for loop which
                        # uses the top-of the stack as it's number of iterations.
[Isi[li0!=dli1-dsi0!=L]dsLx]sg # Store the "greater than" case. It's the above,
                        # but it puts 10 on the stack to use instead.

[1+]sa # Store a macro to add 1 to whatever is the top-of-stack.

Ik # Set precision at non-zero to allow decimal division

/70* # Divide the top two of the stack, v/a; multiply by 70 (`/700*10` == `/70`)
             # dc is postfix and stack-based, so operators come after operands.

0k1~0!=a     # This is a ceiling function.
|> 0k  # set precision to 0 to perform integer division
|> 1~  # push the quotient of integer division by 1, and then the remainder. (r is top)
|> 0!=a # If the top-of-stack (decimal part) is not 0, add 1 to the quotient

dI>ldI!>g # Conditional statement
|> dI>l  # (d)uplicate the top, push 10 on. If 10 > the old top, execute the `l`ess-than
          # case, which loops top-of-stack times.
|> dI!>g # Complement of the above, using the `g`reater-than to loop 10 times.

IP # print a newline

This is probably more golf-able, but I was trying to get it finished to avoid premature optimization.

2 bytes saved by duplicating-saving instead of saving-loading
4 bytes saved dividing by 70
6 bytes from daniero's suggestions (non-strings, ASCII nums instead; 10 => I)

[*]n => 42P. Every instance of 10 can be replaced by I. []p => IP

Haskell, 35 bytes
This solution is as completely different from Laikonis answer as it gets for something this trivial. Yet the score (for now) is exactly the same.
v%a=take(ceiling$v/a/70)[0..9]>>"*"

This produces ten stars, then shaves off some. Easy to extend to arbitrary difficulty with an infinite list.
I did manage to shave off one more byte. But while all test cases work, this shouldn't be correct in general.
v%a=take(1+div v(a*70))[0..9]>>"*"

Vyxal, 9 bytes
/70/ṙ›\**

Try it Online!

PHP 5.6, 66 bytes
function a($v,$a){echo str_repeat('*',max(0,min(10,1+$v/$a/70)));}

First we simplify the equation to v/a/70. From there we add 1 since PHP will use this number as an integer for the str_repeat, essentially doing abs($number+1). Then we use the hand-rolled clamp function of max($min_number, min($max_number, $the_number)) to keep it between 1 and 10.
The substr version is a few bytes shorter (due to not having to have to build in the clamp functionality), but this one was more fun to make.

Ruby, 47 35 bytes
f=->(v,a){'*'*((v/=a*70)<9?v+1:10)}

Called with f.call(v,a)
Saved 12 bytes thanks to user3334690, now the function implicitly returns the result.

you can probably save a bit by doing string * number like: "q=->(v,a){''((v/=a*70)<9?v+1:10)}"

You can safely remove f=

Ruby, 27 bytes
->v,a{(?**10)[1..(v/a/70)]}

PowerShell v2+, 47 bytes
-join(('*'*11)[1..($args[0]/$args[1]/70+.499)])

Somewhat a port of @Neil's JavaScript answer.
Takes input $args and divides them, then divides that by 70, and adds .499. Since PowerShell does banker's rounding, this is effectively ceil to two decimal points of precision. If additional precision is required, tack on as many additional 9s as required.
Along with the 1.., this forms a range index into a string. The string is '*'*11, i.e. '***********'. That results in a char-array, so we -join it together back into a string. That string is left on the pipeline and output is implicit. Like Neil's answer, this effectively "clamps" the output to be between 1 and 10 stars.
Test Suite
PS C:\Tools\Scripts\golfing> @(@(163,2), @(548,22), @(1452,24), @(1713,37), @(4162,32), @(3067,15), @(22421,19))|%{($_-join', ')+" -> " +(.\difficulty-of-a-question $_[0] $_[1])}
163, 2 -> **
548, 22 -> *
1452, 24 -> *
1713, 37 -> *
4162, 32 -> **
3067, 15 -> ***
22421, 19 -> **********

Python 3, 69 68 bytes
I didn't want to copy the Python 2 answer, so mine is slightly longer.
from math import*
x=lambda v,a:print(max(0,min(ceil(v/a/70),10))*'*')

Saved 1 byte thanks to Program man

You do need to include imports, but from math import * will save a couple bytes

Included the import into the byte count

According to the spec, 0 is the minimum stars, not 1. Also save a whole 1 byte by import* with no space.

Oops I misread the minimum.  Thanks for the tip

@Programman Though the spec says 0 is minimum, division and multiplication of non-negative, non-zero integers is guaranteed to != 0, and the ceiling operator will make anything between 0-1 and make it 1. Although I suppose there could be the case of 0 views, however 0 views implies 0 answers, which leads to undefined behavior (division by 0). It's likely provable that 0 is impossible and should not even be mentioned.

@Delioth I did not consider that 0 views implies 0 answers, so you're absolutely right.

Fourier, 46 bytes
All division in Fourier is integer division, so I just add one after division.
I*10/I/700^~X<0{1}{0~X}X>10{1}{10~X}X(42ai^~i)

Try it online!

Actually, 14 bytes
:70a\\u9ukm'**

Try it online!
Takes advantage of the fact that 0 views and 0 answers is impossible, and thus ceil(v/a) > 0.
Explanation:
:70a\\u9ukm'**
:70             push 70 ([70 a v])
   a            invert stack ([v a 70])
    \\          integer division twice ([v//a//70])
      u         add 1 ([v//a//70 + 1])
       9uk      push 10, make stack into list ([[v//a//70+1, 10]])
          m     minimum of list
           '**  push "*", repeat

Perl 6: 32 bytes
As a lambda that takes two arguments:
{"*"x min 10,ceiling $^x/$^y/70}

Add++, 17 bytes
L^,/70/i9b<"*"$yp

Try it online!
Not often I get to use the ^ flag in code-golf
How it works
L^,		; Create a lambda that returns the stack joined
		; Example arguments:	[3067 15]
	/	; Divide;		[204.46]
	70/	; Divide by 70;		[2.921]
	i	; Floor;		[2]
	9b>	; Minimum with 9;	[2]
	"*"	; Push '*';		[2 '*']
	y	; Repeat with an extra;	['*' '*' '*']

Jelly, 10 bytes
÷÷70Ċ«⁵”*x

Try it online!
How it works
÷÷70Ċ«⁵”*x - Main link. Takes v on the left and a on the right
÷          - v ÷ a
 ÷70       - v ÷ a ÷ 70
    Ċ      - ⌈v ÷ a ÷ 70⌉
     «⁵    - min(⌈v ÷ a ÷ 70⌉, 10)
       ”*x - Repeat "*" min(⌈v ÷ a ÷ 70⌉, 10) times

Batch, 81 bytes
@set/an=(700*%2-%1)/%2/70,n*=!(n^>^>31)
@set s=**********
@call echo %%s:~%n%%%

Port of my JavaScript answer, except that Batch uses integer arithmetic, so I wrote the formula as (700*a-v)/a/70 which will truncate towards zero, and then the n*=!(n^>^>31) clears n if it is negative.

Batch makes my eyes bleed, but nice answer!

Thunno 2, 10 bytes
/70/ṃ'*T×ɱ

Try it online!
Explanation
/70/ṃ'*T×ɱ  '# Implicit input
/            # Divide v by a
 70/         # Divide this by 70
    ṃ        # Take the ceiling
     '*T×   '# Push 10 asterisks
         ɱ   # Take that many characters
             # (with a maximum of 10)
             # from the string
             # Implicit output

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Check if input is permutation of source
Inspired by Input ∩ Source Code.

Task

Your task is to determine whether the input is a permutation of the source code.

Input

A string. Input is flexible; it should be able to handle the character encoding used for the source code.

Output

You may only have two possible outputs, one when the input is a permutation of the source code, and one when it is not. Those outputs maybe be of any length (including 0) but must be distinct, consistent, and deterministic.

Specs

Similar to quine challenges, the program/function may not read its own source code and 0-byte solutions are not allowed.

Example
If your source code is ppcg, then an input of cpgp or ppcg would be a permutation of the source code while cpg or cggp or caqp or cpaqr would not be.

Do I need to consider new lines too?

Related.

This is a generalised quine of this question. IMO that makes it borderline dupe.

Closed a few seconds before I hit the 'post' button. Ah well, here it is anyway. Javascript, 71 bytes: i=>([...i].sort().reduce((a,b)=>(a<<5)-a+b.charCodeAt(0),0)&4095)==2337

The "duplicate" asks to check if two strings are equal up to permutation. In this challenge one of those strings is the source code of the program you are using for the task. How can it be a duplicate? Does any of those answers work here, even with some modifications?

@LuisMendo because there are no viable solutions to this challenge except combining the language's standard generalised quine with the shortest solution from the other challenge. There's no good way to solve this except by tacking the string processing problem onto a normal quine, so this challenge doesn't add anything new.

Python 2.7, 135 112 bytes
print sorted(list(input()))==sorted(list('\''*7+'\\'*3+'print sorted(list(input()))==sorted(list(*7+*3+*2))'*2))

Is newline a character?

In the meantime can you use ; to eradicate newlines? We're discussing about newlines


text:
Curiosity killed the cat?
Some people say curiosity killed the cat. Other say it was the box and poison. The RSPCA say Erwin Schrödinger needs to lose the right to own pets.
With animal rights activists outside his house. The cat murderer scientist Schrödinger has finally come up with his greatest invention. A special, radioactive mix of unobtanium and handwavium that can have any half life, and a single gram of the product is capable of killing any living creature. Unfortunately, when he tried to test it on his final cat: Bob, he forgot that cats have 9 lives, and so would need 9 grams to kill. With some water but no food, poor Bob will live exactly 1 week (7 days) if the product doesn't kill him first.
The task:
Given an input of a mass in milligrams and a half-life in milliseconds -  both integers which can exceed 2^31, write a program that outputs whether or not the mystery super product kills the cat, or if it's 1 week time limit expires first. Assume true/yes/1/anything specified in the answer is for when he does not die from starvation.
For the product to kill him, a total of 9 grams must decay. So out of a sample of 18 grams, 1 half-life must pass. If the sample contains less than or equal to 9 grams, this will never be achieved, and so it can be immediately assumed 1 week will pass before 9 grams decays.
You may assume:

Bob dies the microsecond 9 grams has decayed.
The change is mass due to decay does not matter.
All days and times follow generally accepted earth time.
The box Bob is sealed in is unbreakable and unopenable, so there is no chance of death from other causes.
Oxygen is also no issue.
If both happen at the exact same time either output is acceptable.
All inputs should be below 2^63-1

Test cases:
Example:
18000 604800001

For 9 grams to decay, exactly 1 half life must pass (18000/2 = 9000 milligrams or 9 grams). 1 half life is 604800001 milliseconds, or 168 hours and 1 millisecond, or exactly 1 week and 1 millisecond. Since Bob dies of hunger at exactly 1 week, the output is false as he died from hunger just before the 9 gram product limit was reached
8000 40000 false

70000 800 true

18000 604800000 either

18000 604800001 false

18000 604799999 true

1 1 false

100000 1 true

1000000000 1000000000 true

Scoring:
Naturally we want Bob's suffering to end quickly, and so a shorter half-life is best. Half-life and byte both end in E, so clearly the shortest byte count wins.

You do realize that a radioactive substance never fully decays

I have no idea what we have to do here... Can you go through each step to find out if the output should be true or false?

Hi and welcome to PPCG! As others have said, this could use just a bit more clarification. If you address the points raised above, I think this could be a neat challenge, and it would get reopened. For future reference, we do have a Sandbox available so authors can get feedback on challenges before posting them to the main site.

Edited, is this better or should there be an example for both outputs?

@Rohan Jhunjhunwala - I know, the question is asking if 9 grams of the total will decay within 1 week

Could you give us an equation for which outputs give True?

@xnor For half-life λ and mass m, m-m*(1/2)**(604800000/λ) > 9000 (or ≥, since the edge case can go either way).

@Mego Thanks. This can also be written 2**(-6048e5/λ)+9e3/m<1 if that's useful to anyone.

Python 3, 33 bytes
lambda a,b:a-a*.5**(6048e5/b)>9e3

Explanation:
         6048e5         # number of milliseconds in 1 week
               /b       # half-lifes per week
  a*.5**(        )      # mgs of substance remaining after 1 week
a-                      # mgs of substance decayed after one week
                  >9e3  # return true if more than 9000mgs has decayed in 1 week

Try here

Also 33 bytes: lambda a,b:2**(-6048e5/b)+9e3/a<1

Fourier, 51 bytes
I have to admit that I don't fully understand this program... Mainly just a translation of TheNumberOne's Python code.
oI~M~NI~H604800000~G>H{1}{G/H^(M/2~Mi^~i)N-M>9000@o}

Note this is the first program that I've written for PPCG which uses @, the clear output function.
Try it online!

Fitting user name...

@ojdo Haha yes :D

CJam (22 bytes)
q~dX.5@6048e5\/#-*9e3>

Online demo
Dissection
A quick explanation of the maths: if the halflife is λ then after time t the proportion of the radioactive material remaining is (1/2)^(t/λ), so the proportion decayed is 1 - (1/2)^(t/λ).
q~d         e# Parse input, ensuring that the later division will use doubles
X.5@6048e5\ e# Rearrange stack to: m 1 0.5 6048e5 λ
/#-*        e# Div, pow, sub, mul, giving the total mass decayed after a week
9e3>        e# Is it OVER 9000! ?

Actually, 20 bytes
5╤:6048*/1½ⁿ1-*93╤*<

Try it online!
Explanation:
5╤:6048*/1½ⁿ1-*93╤*<
5╤                    10**5
  :6048               6048
       *              6048*10**5 (milliseconds in 1 week)
        /             divide by half-life
         1½ⁿ          (1/2)**(^)
            1-        1-(^) (% of sample decayed after 1 week)
              *       multiply by sample mass (mass decayed after 1 week)
               93╤*   9*10**3 (9000)
                   <  is 9000 < sample mass decayed?

Dyalog APL, 19 bytes
9E3≤⊣-⊣×.5*6048E5÷⊢

9E3≤ is 9000 smaller than or equal to
⊣- the left argument (mass) minus
⊣× the left argument times
.5*  ½ to the power of
6048E5÷⊢ 604800000 divided by the right argument (half-life)
No need for parentheses, as APL is strictly right-to-left.
TryAPL online!

19 bytes. That's dyabolical.

@matrixugly In this case, I'd ask why the other languages have so much fluff. I have exactly one character per "thing" in a quite normal-looking infix (like math) notation.


text:
Compute the polyomino capacity of a rectangle
Write a program or function that takes as input three positive integers x, y, and a and returns or outputs the maximum number of whole a✕1 rectangles that can be packed (axis-aligned) into an x✕y rectangle.  Although the result will always be an integer, the program need not give the result using an integer type; in particular, floating-point outputs are acceptable.  Use of standard loopholes is forbidden.  Answers are scored in bytes including the cost of non-standard compiler flags or other marks.
Sample inputs and outputs:
 x,  y,  a -> result
--------------------
 1,  1,  3 ->      0
 2,  2,  3 ->      0
 1,  6,  4 ->      1
 6,  1,  4 ->      1
 1,  6,  3 ->      2
 6,  1,  3 ->      2
 2,  5,  3 ->      2
 5,  2,  3 ->      2
 3,  3,  3 ->      3
 3,  4,  3 ->      4
 4,  3,  3 ->      4
 4,  4,  3 ->      5
 6,  6,  4 ->      8
 5,  7,  4 ->      8
 7,  5,  4 ->      8
 6,  7,  4 ->     10
 7,  6,  4 ->     10
 5,  8,  3 ->     13
 8,  5,  3 ->     13
12, 12,  8 ->     16
12, 13,  8 ->     18
13, 12,  8 ->     18
 8,  8,  3 ->     21
12, 12,  5 ->     28
13, 13,  5 ->     33

In response to a question in the comments, note that some optimal packings may not be obvious at first glance.  For instance, the case x=8, y=8, and a=3 has solutions that look like this:
||||||||
||||||||
||||||||
---||---
---||---
|| ||---
||------
||------

(8 + 2 + 2 = 12 vertical placements and 2 + 3 + 4 = 9 horizontal placements gives 12 + 9 = 21 placements in total.)

So many links to meta... o.O

Maybe I'm just not seeing it but how do you fit 21 3x1's into an 8x8 grid?

I feel like I've seen this question beforw. Lemme search.

Nice first question (even if confirmed to be duplicate)!

@Edward Yep, thanks for the clarification!

Not finding a dupe. I seem to remember something with fitting 1x4's, so having variable sizes would make this different.

Must the rectangles be placed axis-aligned?

@xnor Let's say yes, axis-aligned.

Python 2, 53 bytes
lambda p,q,n:p/n*q+q/n*(p%n)-min(0,n-p%n-q%n)*(p>n<q)

Adapts the formula given in this paper, which is:
def f(p,q,n):a=p%n;b=q%n;return(p*q-[a*b,(n-a)*(n-b)][a+b>=n and p>=n and q>=n])/n