結果

問題 No.3003 多項式の割り算 〜hard〜
ユーザー tobbie
提出日時 2025-04-14 19:10:23
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 1,925 ms
コンパイル使用メモリ 192,068 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-04-14 19:10:27
合計ジャッジ時間 3,011 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using ll = long long int;

int main() {
  ll a, b;
  cin >> a >> b;
  if (b % 3 == 0) {
    cout << 0 << " " << a << endl;
  } else if (b % 3 == 1) {
    cout << a << " " << 0 << endl;
  } else {
    cout << -a << " " << -a << endl;
  }
  return 0;
}
0