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 }