NEWTON
Asked
5 months ago
8
views
0
Please make the function return the floor of the value so we are returned a felt
Test 1
Input(s): 4
Output(s): 2
Test 2
Input(s): 16
Output(s): 4
Test 3
Input(s): 127
Output(s): 6
Test 4
Input(s): 1099511600000
Output(s): 39
ㅤ This question was originally posted on Triality
0
Test #1
Test #2
Test #3
Test #4
This is a function that is optimized for any number between 1 and 2 ^ 125 currently
ㅤ This answer was originally posted on Triality
answered
6 months ago
0
Test #1
Test #2
Test #3
Test #4
This is a naive strategy that will work but is not optimized for large numbers
ㅤ This answer was originally posted on Triality
answered
6 months ago
How to calculate the sum of the digits of a felt in Cairo?
Changing a variable with an initialized value recursively with if statements
Cairo: How do write a log function in Cairo
Cairo: are builtins always needed to be expressed in function signature?
How to make output like "hello world" in Cairo Language (StarkNet)?
Cairo: How do I find the current contract's address?
Cairo: Getting the squared summation of felts in an array
Are there situations in which we prefer declaring variables as `local` vs `tempvar`?
Cairo: Getting function selector
How does warp handles the contract solidity version?
How many time does it take for stark to eth starkgate bridge process?
Where can I learn more about starknet?
What are Event Indexers in Cairo lang? What is a StarkNet indexer?
Namespaces in Cairo