Skip to main content
Commonmark migration
Source Link

#Pyth, 15 bytes

Pyth, 15 bytes

/K%R6fP_TSQ5/K1 

Test Suite.

#Pyth, 16 bytes

Pyth, 16 bytes

m/%R6fP_TSQd,1 5 

Test Suite.


#How?

How?

###Explanation #1

Explanation #1

 /K%R6fP_TSQ5/K1 - Full program. fP_TSQ - Filter the primes in the range [1...input]. %R6 - Mod 6 on each. K - Assign them to a variable K. / 5 - Count the occurrences of 5 in K. /K1 - Count the occurrences of 1 in K. - Implicitly output the result. 

###Explanation #2

Explanation #2

 m/%R6fP_TSQd,1 5 - Full program. fP_TSQ - Filter the primes in the range [1...input] %R6 - Mod 6 on each. ,1 5 - Push the list [1, 5] m/ d - Count how many of each there are. - Implicitly output the result. 

Alternatives:

 /K%R6fP_TSQ5/KhZ (16 bytes) K%R6fP_TSQ/K5/K1 (16 bytes) m/%R6fP_TSQdj15T (16 bytes) m/%R6fP_TSQd[1 5 (16 bytes) m/%R6fP_TSQdsM`15 (17 bytes) m/%R6.MP_ZSQd,1 5 (17 bytes) m/%R6.MP_ZSQdj15T (17 bytes) m/%R6.MP_ZSQd[1 5 (17 bytes) 

#Pyth, 15 bytes

/K%R6fP_TSQ5/K1 

Test Suite.

#Pyth, 16 bytes

m/%R6fP_TSQd,1 5 

Test Suite.


#How?

###Explanation #1

 /K%R6fP_TSQ5/K1 - Full program. fP_TSQ - Filter the primes in the range [1...input]. %R6 - Mod 6 on each. K - Assign them to a variable K. / 5 - Count the occurrences of 5 in K. /K1 - Count the occurrences of 1 in K. - Implicitly output the result. 

###Explanation #2

 m/%R6fP_TSQd,1 5 - Full program. fP_TSQ - Filter the primes in the range [1...input] %R6 - Mod 6 on each. ,1 5 - Push the list [1, 5] m/ d - Count how many of each there are. - Implicitly output the result. 

Alternatives:

 /K%R6fP_TSQ5/KhZ (16 bytes) K%R6fP_TSQ/K5/K1 (16 bytes) m/%R6fP_TSQdj15T (16 bytes) m/%R6fP_TSQd[1 5 (16 bytes) m/%R6fP_TSQdsM`15 (17 bytes) m/%R6.MP_ZSQd,1 5 (17 bytes) m/%R6.MP_ZSQdj15T (17 bytes) m/%R6.MP_ZSQd[1 5 (17 bytes) 

Pyth, 15 bytes

/K%R6fP_TSQ5/K1 

Test Suite.

Pyth, 16 bytes

m/%R6fP_TSQd,1 5 

Test Suite.


How?

Explanation #1

 /K%R6fP_TSQ5/K1 - Full program. fP_TSQ - Filter the primes in the range [1...input]. %R6 - Mod 6 on each. K - Assign them to a variable K. / 5 - Count the occurrences of 5 in K. /K1 - Count the occurrences of 1 in K. - Implicitly output the result. 

Explanation #2

 m/%R6fP_TSQd,1 5 - Full program. fP_TSQ - Filter the primes in the range [1...input] %R6 - Mod 6 on each. ,1 5 - Push the list [1, 5] m/ d - Count how many of each there are. - Implicitly output the result. 

Alternatives:

 /K%R6fP_TSQ5/KhZ (16 bytes) K%R6fP_TSQ/K5/K1 (16 bytes) m/%R6fP_TSQdj15T (16 bytes) m/%R6fP_TSQd[1 5 (16 bytes) m/%R6fP_TSQdsM`15 (17 bytes) m/%R6.MP_ZSQd,1 5 (17 bytes) m/%R6.MP_ZSQdj15T (17 bytes) m/%R6.MP_ZSQd[1 5 (17 bytes) 
added 32 characters in body
Source Link
Mr. Xcoder
  • 42.9k
  • 9
  • 87
  • 221

#Pyth, 15 bytes

/K%R6fP_TSQ5/K1 

Test Suite.

#Pyth, 16 bytes

m/%R6fP_TSQd,1 5 

Test Suite.


#How?

###Explanation #1

 /K%R6fP_TSQ5/K1 - Full program. fP_TSQ - Filter the primes in the range [1...input]. %R6 - Mod 6 on each. K - Assign them to a variable K. / 5 - Count the occurrences of 5 in K. /K1 - Count the occurrences of 1 in K. - Implicitly output the result. 

###Explanation #2

 m/%R6fP_TSQd,1 5 - Full program. fP_TSQ - Filter the primes in the range [1...input] %R6 - Mod 6 on each. ,1 5 - Push the list [1, 5] m/ d - Count how many of each there are.  - Implicitly output the result.  

Alternatives:

 /K%R6fP_TSQ5/KhZ (16 bytes) K%R6fP_TSQ/K5/K1 (16 bytes) m/%R6fP_TSQdj15T (16 bytes) m/%R6fP_TSQd[1 5 (16 bytes) m/%R6fP_TSQdsM`15 (17 bytes) m/%R6.MP_ZSQd,1 5 (17 bytes) m/%R6.MP_ZSQdj15T (17 bytes) m/%R6.MP_ZSQd[1 5 (17 bytes) 

#Pyth, 16 bytes

m/%R6fP_TSQd,1 5 

Test Suite.


#How?

 m/%R6fP_TSQd,1 5 - Full program. fP_TSQ - Filter the primes in the range [1...input] %R6 - Mod 6 on each. ,1 5 - Push the list [1, 5] m/ d - Count how many of each there are. 

Alternatives:

 m/%R6fP_TSQdj15T (16 bytes) m/%R6fP_TSQd[1 5 (16 bytes) m/%R6fP_TSQdsM`15 (17 bytes) m/%R6.MP_ZSQd,1 5 (17 bytes) m/%R6.MP_ZSQdj15T (17 bytes) m/%R6.MP_ZSQd[1 5 (17 bytes) 

#Pyth, 15 bytes

/K%R6fP_TSQ5/K1 

Test Suite.

#Pyth, 16 bytes

m/%R6fP_TSQd,1 5 

Test Suite.


#How?

###Explanation #1

 /K%R6fP_TSQ5/K1 - Full program. fP_TSQ - Filter the primes in the range [1...input]. %R6 - Mod 6 on each. K - Assign them to a variable K. / 5 - Count the occurrences of 5 in K. /K1 - Count the occurrences of 1 in K. - Implicitly output the result. 

###Explanation #2

 m/%R6fP_TSQd,1 5 - Full program. fP_TSQ - Filter the primes in the range [1...input] %R6 - Mod 6 on each. ,1 5 - Push the list [1, 5] m/ d - Count how many of each there are.  - Implicitly output the result.  

Alternatives:

 /K%R6fP_TSQ5/KhZ (16 bytes) K%R6fP_TSQ/K5/K1 (16 bytes) m/%R6fP_TSQdj15T (16 bytes) m/%R6fP_TSQd[1 5 (16 bytes) m/%R6fP_TSQdsM`15 (17 bytes) m/%R6.MP_ZSQd,1 5 (17 bytes) m/%R6.MP_ZSQdj15T (17 bytes) m/%R6.MP_ZSQd[1 5 (17 bytes) 
added 19 characters in body
Source Link
Mr. Xcoder
  • 42.9k
  • 9
  • 87
  • 221

#Pyth, 16 bytes

m/%R6fP_TSQd,1 5 

Test Suite.


#How?

 m/%R6fP_TSQd,1 5 - Full program. fP_TSQ - Filter the primes in the range [1...input] %R6 - Mod 6 on each. ,1 5 - Push the list [1, 5] m/ d - Count how many of each there are. 

Alternatives:

 m/%R6fP_TSQdj15T (16 bytes) m/%R6fP_TSQd[1 5 (16 bytes)  m/%R6fP_TSQdsM`15 (17 bytes) m/%R6.MP_ZSQd,1 5 (17 bytes) m/%R6.MP_ZSQdj15T (17 bytes) m/%R6.MP_ZSQd[1 5 (17 bytes) 

#Pyth, 16 bytes

m/%R6fP_TSQd,1 5 

Test Suite.


#How?

 m/%R6fP_TSQd,1 5 - Full program. fP_TSQ - Filter the primes in the range [1...input] %R6 - Mod 6 on each. ,1 5 - Push the list [1, 5] m/ d - Count how many of each there are. 

Alternatives:

 m/%R6fP_TSQdj15T m/%R6fP_TSQd[1 5 m/%R6fP_TSQdsM`15 

#Pyth, 16 bytes

m/%R6fP_TSQd,1 5 

Test Suite.


#How?

 m/%R6fP_TSQd,1 5 - Full program. fP_TSQ - Filter the primes in the range [1...input] %R6 - Mod 6 on each. ,1 5 - Push the list [1, 5] m/ d - Count how many of each there are. 

Alternatives:

 m/%R6fP_TSQdj15T (16 bytes) m/%R6fP_TSQd[1 5 (16 bytes)  m/%R6fP_TSQdsM`15 (17 bytes) m/%R6.MP_ZSQd,1 5 (17 bytes) m/%R6.MP_ZSQdj15T (17 bytes) m/%R6.MP_ZSQd[1 5 (17 bytes) 
added 38 characters in body
Source Link
Mr. Xcoder
  • 42.9k
  • 9
  • 87
  • 221
Loading
added 266 characters in body
Source Link
Mr. Xcoder
  • 42.9k
  • 9
  • 87
  • 221
Loading
Source Link
Mr. Xcoder
  • 42.9k
  • 9
  • 87
  • 221
Loading