rust(day19): smol improvement
This commit is contained in:
parent
788651476c
commit
d6888248c3
|
@ -782,11 +782,7 @@ mod day19 {
|
||||||
writeln!(&mut w, "if __name__ == '__main__':")?;
|
writeln!(&mut w, "if __name__ == '__main__':")?;
|
||||||
writeln!(&mut w, " result = 0")?;
|
writeln!(&mut w, " result = 0")?;
|
||||||
for message in messages {
|
for message in messages {
|
||||||
writeln!(&mut w, " success = validate('{}')", message)?;
|
writeln!(&mut w, " result += validate('{}')", message)?;
|
||||||
// writeln!(&mut w, " print('{}:', success)", message)?;
|
|
||||||
writeln!(&mut w, " if success:")?;
|
|
||||||
writeln!(&mut w, " result += 1")?;
|
|
||||||
writeln!(&mut w)?;
|
|
||||||
}
|
}
|
||||||
writeln!(&mut w, " print('Result:', result)")?;
|
writeln!(&mut w, " print('Result:', result)")?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue