結果
問題 |
No.1680 Sum and Difference
|
ユーザー |
|
提出日時 | 2021-09-17 21:38:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 309 bytes |
コンパイル時間 | 475 ms |
コンパイル使用メモリ | 63,528 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-29 20:02:29 |
合計ジャッジ時間 | 1,142 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 4 WA * 14 |
ソースコード
#include <iostream> using namespace std; int mod = 1e9+7; int sum(int a, int b){ return (a+b)%mod; } int mul(int a,int b){ long long g = (1LL*a*b)%mod; return (int) g; } int main() { int a, b; cin>>a>>b; int o = ((a+1)/2)*2, e = (a/2)*2+1; cout<<sum(mul(o,((b+1)/2)*2),mul(e,(b/2)*2+1)); return 0; }