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 a challenge involving the mathematical operator of division or integer division
4
votes
Divide a number by 3 without using *, /, +, -, % operators
Python2.6 (29)(71)(57)(52)(43)
z=len(range(2,abs(x),3))
print (z,-z)[x<0]
print len(range(2,input(),3))
Edit - Just realized that we have to handle negative integers too. Will fix that later
…