83 lines
694 B
Plaintext
Raw Normal View History

2024-07-18 16:08:30 +00:00
import sys
2024-07-07 15:13:22 +00:00
main() {
x := 0
if x != 0 {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
if x > 0 {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
if x < 0 {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
if 0 != x {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
if 0 > x {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
if 0 < x {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
2024-07-08 11:38:44 +00:00
if x >= 1 {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
2024-07-08 11:38:44 +00:00
if 1 <= x {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
2024-07-08 11:38:44 +00:00
if x + 1 != x + 1 {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
if x + 1 != inc(x) {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
2024-07-08 11:38:44 +00:00
if x - 1 != dec(x) {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-08 11:38:44 +00:00
}
if inc(x) != x + 1 {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-08 11:38:44 +00:00
}
if dec(x) != x - 1 {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-08 11:38:44 +00:00
}
if x != inc(dec(x)) {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-08 11:38:44 +00:00
}
if inc(dec(x)) != x {
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
2024-07-23 20:14:23 +00:00
if inc(x) == dec(x) {
sys.exit(1)
}
2024-07-07 15:13:22 +00:00
if x == 0 {
2024-07-18 16:08:30 +00:00
sys.exit(0)
2024-07-07 15:13:22 +00:00
}
2024-07-18 16:08:30 +00:00
sys.exit(1)
2024-07-07 15:13:22 +00:00
}
inc(x) {
return x + 1
}
dec(x) {
return x - 1
}