結果
問題 | No.3003 多項式の割り算 〜hard〜 |
ユーザー |
|
提出日時 | 2025-01-31 19:13:11 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 409 bytes |
コンパイル時間 | 2,715 ms |
コンパイル使用メモリ | 192,860 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-31 19:13:15 |
合計ジャッジ時間 | 4,089 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
#include<bits/stdc++.h>using namespace std;using ll = long long;#define rep(i,n) for(int i=0;i<n;i++)#define all(A) A.begin(),A.end()int main() {cin.tie(nullptr);ios::sync_with_stdio(false);ll A,B;cin>>A>>B;B%=3;if(B==0){cout<<0<<" "<<A<<endl;}else if(B==1){cout<<A<<" "<<0<<endl;}else{cout<<-A<<" "<<-A<<endl;}}