結果
| 問題 |
No.3002 多項式の割り算 〜easy〜
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-31 19:13:03 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 409 bytes |
| コンパイル時間 | 4,203 ms |
| コンパイル使用メモリ | 193,172 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-01-31 19:13:09 |
| 合計ジャッジ時間 | 4,584 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
#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;
}
}