Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
For challenges which involve deciding whether or not the input meets certain criteria, and outputting some data, representing that decision.
1
vote
An abundance of integers!
C# (.NET Core), 59, 53 bytes
Without LINQ.
EDIT: Thanks to ASCII-only for pointing out for(;++k<p;) instead of for(;k<p;k++).
C# (.NET Core), 53 bytes
p=>{int k=0,n=0;for(;++k<p;)n+=p%k<1?k:0;r …
0
votes
Detect heat waves
C# (.NET Core), 81 bytes
Without LINQ.
a=>{int b=0;foreach(int i in a){b+=i<25?-b:i>29?11:1;if(b>34)return 1;}return 0;}
Try it online!
4
votes
Is the number binary-heavy?
C# (.NET Core), 62, 49 bytes
Without LINQ.
EDIT: dana with a -13 byte golf changing the while to a recursive for and returning a bool instead of integer.
x=>{int j=0;for(;x>0;x/=2)j+=x%2*2-1;ret …
0
votes
Determine whether strings are anagrams
C# (.NET Core), 108 bytes
Without LINQ. Returns 1 for true, 0 for false.
(a,b)=>{int x=a.Length==b.Length?1:0;foreach(char c in a){try{b.Remove(b.IndexOf(c));}catch{x=0;}}return x;}
Try it onli …
3
votes
Equal, sum or difference!
C# (.NET Core), 43, 48, 47, 33 bytes
EDIT: Tried to use % and apparently forgot how to %. Thanks to Arnauld for pointing that out!
EDIT2: AdmBorkBork with a -1 byte golf rearranging the parenthes …
2
votes
Multi-level marketing "legs" investment rule
C# (.NET Core), 129, 89 bytes
EDIT: Thanks to Kevin Cruijssen for golfing off 40 bytes while explaining the mechanics as to why!
(n,q,t,m)=>{int c=0,j;for(;m<=n&c<1;c=c<m++?0:1)for(j=n;j-->0;)c+= …
1
vote
Find if a list is an ABC-triple
C# (.NET Core), 68 bytes
Without Linq.
(a,b,c)=>{var t=a<b&a+b==c;while(b>0){c=b;b=a%b;a=c;}return t&a<2;};
Try it online!