結果

問題 No.2400 Product of Gaussian Integer
ユーザー tnakao0123
提出日時 2023-08-07 10:41:20
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 581 ms
コンパイル使用メモリ 39,620 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 14:33:51
合計ジャッジ時間 1,352 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 2400.cc:  No.2400 Product of Gaussian Integer - yukicoder
 */

#include<cstdio>
#include<algorithm>
 
using namespace std;

/* constant */

/* typedef */

typedef long long ll;

/* global variables */

/* subroutines */

/* main */

int main() {
  ll a, b, c, d;
  scanf("%lld%lld%lld%lld", &a, &b, &c, &d);

  // (a+bi)(c+di)=(ac-bd)+(ad+bc)i

  printf("%lld %lld\n", a * c - b * d, a * d + b * c);

  return 0;
}
0