题解 | 小红的合数寻找
小红的合数寻找
https://www.nowcoder.com/practice/2a35a6306f204ea3ab76ff10d188ff9e
#include <stdio.h> int main() { int a; while (scanf("%d ", &a) != EOF) { // 注意 while 处理多个 case // 64 位输出请用 printf("%lld") to for(int i=2*a;i>=a;i--) { if (a==1) { printf("-1");break; } else {printf("%d",2*a);break;} } } return 0; }