Skip to content

Instantly share code, notes, and snippets.

@pinglunliao
Last active November 5, 2019 08:25
Show Gist options
  • Save pinglunliao/8b301f61b70722273e84 to your computer and use it in GitHub Desktop.
Save pinglunliao/8b301f61b70722273e84 to your computer and use it in GitHub Desktop.
a005: Eva 的回家作業 FYI: https://yunlinsong.blogspot.com/2016/01/eva.html
#include <iostream>
using namespace std;
int main() {
short t;
cin >> t;
while(t-- > 0){
int a, b, c, d, e, r;
cin >> a >> b >> c >> d;
r = b - a;
if( d == a + 3*r )
{
e = a + 4 * r;
}
else
{
r = b / a;
r = r * r;
r = r * r;
e = a * r;
}
cout << a << " " << b << " "
<< c << " " << d << " "
<< e << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment