結果
| 問題 | 
                            No.2847 Birthday Attack
                             | 
                    
| コンテスト | |
| ユーザー | 
                             AngrySadEight
                         | 
                    
| 提出日時 | 2024-07-04 23:31:38 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 464 bytes | 
| コンパイル時間 | 906 ms | 
| コンパイル使用メモリ | 72,552 KB | 
| 最終ジャッジ日時 | 2025-02-22 02:04:57 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | WA * 14 | 
ソースコード
#include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
ll mod = 998244535;
int main() {
    ll X, Y;
    cin >> X >> Y;
    ll ans = 0;
    for (ll i = 1; i <= X; i++) {
        ans += 2 * max(X - 2 * i, 0LL) * Y;
        ans %= mod;
    }
    for (ll i = 1; i <= Y; i++) {
        ans += 2 * max(Y - 2 * i, 0LL) * X;
        ans %= mod;
    }
    cout << ans << endl;
}
            
            
            
        
            
AngrySadEight