style: 改进条件语句的缩进以增强可读性
将单行条件语句拆分为多行,使代码结构更清晰。
This commit is contained in:
Binary file not shown.
@@ -13,7 +13,8 @@ public class Main {
|
||||
int id = in.nextInt();
|
||||
if (id >= 0 && id <= 100) {
|
||||
mention[id]++;
|
||||
if (sender >= 0 && sender <= 100) by[id][sender] = true;
|
||||
if (sender >= 0 && sender <= 100)
|
||||
by[id][sender] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,7 +31,8 @@ public class Main {
|
||||
boolean first = true;
|
||||
for (int s = 0; s <= 100; s++) {
|
||||
if (by[bestId][s]) {
|
||||
if (!first) sb.append(' ');
|
||||
if (!first)
|
||||
sb.append(' ');
|
||||
sb.append(s);
|
||||
first = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user