A. Definite Game

签.

 1 #include <bits/stdc++.h>
 2 using namespace std;
 3 
 4 int main()
 5 {
 6     int a;
 7     while (scanf("%d", &a) != EOF)
 8     {
 9         [](int x) 
10         {
11             for (int i = x - 1; i >= 1; --i) if (x % i)
12             {
13                 printf("%d\n", x - i);
14                 return;
15             }
16             printf("%d\n", x);
17         }(a);
18     }
19     return 0;
20 }
View Code

相关文章:

  • 2021-10-08
  • 2021-10-03
  • 2021-05-27
  • 2021-09-17
  • 2021-11-03
猜你喜欢
  • 2021-11-27
  • 2021-08-28
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
相关资源
相似解决方案