結果
問題 | No.1680 Sum and Difference |
ユーザー |
![]() |
提出日時 | 2021-10-20 14:06:47 |
言語 | Perl (5.40.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 203 bytes |
コンパイル時間 | 160 ms |
コンパイル使用メモリ | 7,068 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-20 06:33:31 |
合計ジャッジ時間 | 1,147 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 4 WA * 14 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
use strict; use warnings; use utf8; my ($a, $b) = split / /, <>; my $ans; if ($a%2 == $b%2) { $ans = ($a+1)*($b+1) + $a*$b; } else { $ans = ($a+1)*$b + $a*($b+1); } print $ans % (10**9+7), "\n";