【发布时间】:2013-09-16 13:12:55
【问题描述】:
作为学习如何在 Lasso 中编码的一部分,我一直在研究 Project Euler 问题,我想知道我的解决方案是否可以改进。这是我在 Lasso 8 代码中的问题 #1 下面得到的,它返回正确的答案:
var ('total' = 0);
loop(1000-1);
loop_count % 3 == 0 || loop_count % 5 == 0 ? $total += loop_count;
/loop;
output($total);
我的问题:有没有更好或更快的编码方式?谢谢!
【问题讨论】:
-
我会在 Lasso 9 中做很多不同的事情,所以我需要检查我自己的答案...这个 Chris 是什么问题?