結果

問題 No.1680 Sum and Difference
ユーザー tailstails
提出日時 2021-09-17 21:37:33
言語 Perl
(5.38.2)
結果
AC  
実行時間 43 ms / 1,000 ms
コード長 119 bytes
コンパイル時間 763 ms
コンパイル使用メモリ 11,352 KB
実行使用メモリ 11,596 KB
最終ジャッジ日時 2023-09-12 07:02:11
合計ジャッジ時間 2,685 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
11,388 KB
testcase_01 AC 42 ms
11,436 KB
testcase_02 AC 43 ms
11,336 KB
testcase_03 AC 42 ms
11,324 KB
testcase_04 AC 42 ms
11,256 KB
testcase_05 AC 42 ms
11,552 KB
testcase_06 AC 42 ms
11,496 KB
testcase_07 AC 41 ms
11,388 KB
testcase_08 AC 42 ms
11,528 KB
testcase_09 AC 42 ms
11,380 KB
testcase_10 AC 42 ms
11,324 KB
testcase_11 AC 42 ms
11,596 KB
testcase_12 AC 42 ms
11,380 KB
testcase_13 AC 42 ms
11,324 KB
testcase_14 AC 42 ms
11,268 KB
testcase_15 AC 42 ms
11,340 KB
testcase_16 AC 42 ms
11,376 KB
testcase_17 AC 42 ms
11,548 KB
testcase_18 AC 42 ms
11,544 KB
testcase_19 AC 42 ms
11,508 KB
testcase_20 AC 42 ms
11,260 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use bigint;
sub MD(){1000000007}
($a,$b)=map$_+0,glob<>;
print+(($a%MD*2+1)*($b%MD*2+1)+1)%MD*((MD+1)/2)%MD-($a+$b&1);
0