Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1576    Accepted Submission(s): 677


Problem Description
Given an integer z is maximum.
 

 

Input
There are multiple test cases. The first line of input contains an integer 6).
 

 

Output
For each test case, output an integer denoting the maximum 1 instead.
 

 

Sample Input
3
1
2
3
 

 

Sample Output
-1
-1
1
 

 

Source

 

 1 #include <iostream>
 2 
 3 using namespace std;
 4 
 5 int main(){
 6     int t;
 7     long long int n;
 8     scanf("%d",&t);
 9     while(t--){
10         scanf("%lld",&n);
11         if(n%3==0){
12             printf("%lld\n",n*n*n/27);
13         }else if(n%4==0){
14             printf("%lld\n",n*n*n/32);
15         }else{
16             puts("-1");
17         }
18     }
19     return 0;
20 }

 

相关文章:

  • 2021-08-08
  • 2021-08-29
  • 2021-12-30
  • 2022-02-21
  • 2021-12-28
  • 2021-09-09
  • 2021-10-31
猜你喜欢
  • 2022-12-23
  • 2022-01-04
  • 2022-12-23
  • 2022-02-25
  • 2022-12-23
  • 2021-11-18
  • 2021-08-28
相关资源
相似解决方案