ACPC10A

ACPC10A

#include<iostream>
using namespace std;

int main()
{
    long int a,b,c;
    cin>>a>>b>>c;
   
    while((a!=0)||(b!=0)||(c!=0))
    {
    if((b-a)==(c-b))
    cout<<"AP "<<(c+(b-a))<<endl;
    else if((b/a)==(c/b))
    cout<<"GP "<<(c*(b/a))<<endl;                            
                                 cin>>a>>b>>c;
                                 }
    return 0;
   
   
    }

No comments:

Post a Comment