結果
問題 |
No.8062 A + B
|
ユーザー |
👑 ![]() |
提出日時 | 2020-09-28 15:07:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 306 bytes |
コンパイル時間 | 1,553 ms |
コンパイル使用メモリ | 165,520 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 04:21:13 |
合計ジャッジ時間 | 2,152 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 3 WA * 5 |
ソースコード
#include<bits/stdc++.h> using namespace std; using LL = long long; using ULL = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int main() { LL a,b; cin>>a>>b; LL ans; if(b<0){ ans=a-b; } else{ LL d=10; while(d<=b) d*=10; ans = a*d + (a/abs(a))*b; } cout<<ans<<endl; return 0; }