Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
-8 bytes thanks to BMO.
main=do x<-readFile"a";print$length x`gcd`3 --
Try it online!Try it online!
Needs the file name to be a. Apparently GHC needs the file to end with .hs, but runhaskell doesn't care.
a
.hs
runhaskell
Try it online!
-cpp
main=do x<-readFile __FILE__;print$lengthreadFile"a";print$length x`gcd`3 --
main=do x<-readFile __FILE__;print$length x`gcd`3 --
-1 byte8 bytes thanks to BMO.
main=do x<-readFile __FILE__;print$sum$1:[2|length__FILE__;print$length x>118]x`gcd`3 --
-1 byte thanks to BMO.
main=do x<-readFile __FILE__;print$sum$1:[2|length x>118]--