zoj | The codes for zju online judge
kandi X-RAY | zoj Summary
kandi X-RAY | zoj Summary
The codes for zju online judge
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of zoj
zoj Key Features
zoj Examples and Code Snippets
Community Discussions
Trending Discussions on zoj
QUESTION
I'm writing a program for zoj 1733, and the problem is on line 8:
...ANSWER
Answered 2017-Jun-21 at 03:27You declare x
and y
as string global variables, and also as integer local variables. When you access them inside the function, it'll consider the integer version as they're in closer scope. Change the name of either of them and it should work fine.
Edit: By "either of them" I mean change the names of the global variables or the local variables, not either x or y :)
You can also reference the global variables inside the function by using ::x
and ::y
. This will inform the compiler to access the global one, but I'd really suggest to just change the variables names.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install zoj
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page