結果
| 問題 |
No.84 悪の算盤
|
| コンテスト | |
| ユーザー |
myanta
|
| 提出日時 | 2017-06-28 02:25:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 225 bytes |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 22,528 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-04 11:49:32 |
| 合計ジャッジ時間 | 665 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 3 |
ソースコード
#include<cstdio>
using ll=long long;
int main(void)
{
int r, c;
while(scanf("%d%d", &r, &c)==2)
{
ll ans;
if(r&1 && c&1) ans=(ll)r*(c-1)/2+(r+1)/2;
else ans=(ll)r*c/2;
printf("%lld\n", ans-1);
}
return 0;
}
myanta