public class Main {
public Main() {
}
System.
out.
println("Система расчёта штрафов"); int carSpeed = 0;
int fineFor20to40 = 500;
int fineFor40to60 = 1000;
int fineFor60to80 = 2000;
int fineFor80andMore = 5000;
int townSpeed = 60;
int overSpeed = carSpeed - townSpeed;
if (overSpeed < 20) {
System.
out.
println("Скорость не превышена или превышена незначительно"); } else if (overSpeed >= 20 && overSpeed < 40) {
System.
out.
println("Штраф: " + fineFor20to40
+ " рублей"); } else if (overSpeed >= 40 && overSpeed < 60) {
System.
out.
println("Штраф: " + fineFor40to60
+ " рублей"); } else if (overSpeed >= 60 && overSpeed < 80) {
System.
out.
println("Штраф: " + fineFor60to80
+ " рублей"); } else if (overSpeed >= 80) {
System.
out.
println("Штраф: " + fineFor80andMore
+ " рублей"); }
}
}
cHVibGljIGNsYXNzIE1haW4gewogICAgcHVibGljIE1haW4oKSB7CiAgICB9CgogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgdGhyb3dzIEV4Y2VwdGlvbiB7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCLQodC40YHRgtC10LzQsCDRgNCw0YHRh9GR0YLQsCDRiNGC0YDQsNGE0L7QsiIpOwogICAgICAgIGludCBjYXJTcGVlZCA9IDA7CiAgICAgICAgaW50IGZpbmVGb3IyMHRvNDAgPSA1MDA7CiAgICAgICAgaW50IGZpbmVGb3I0MHRvNjAgPSAxMDAwOwogICAgICAgIGludCBmaW5lRm9yNjB0bzgwID0gMjAwMDsKICAgICAgICBpbnQgZmluZUZvcjgwYW5kTW9yZSA9IDUwMDA7CiAgICAgICAgaW50IHRvd25TcGVlZCA9IDYwOwogICAgICAgIGludCBvdmVyU3BlZWQgPSBjYXJTcGVlZCAtIHRvd25TcGVlZDsKICAgICAgICBpZiAob3ZlclNwZWVkIDwgMjApIHsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCLQodC60L7RgNC+0YHRgtGMINC90LUg0L/RgNC10LLRi9GI0LXQvd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