結果
| 問題 |
No.84 悪の算盤
|
| コンテスト | |
| ユーザー |
kanpurin002
|
| 提出日時 | 2018-11-14 21:55:55 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 298 bytes |
| コンパイル時間 | 433 ms |
| コンパイル使用メモリ | 28,672 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 13:51:35 |
| 合計ジャッジ時間 | 1,068 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <stdio.h>
int main() {
int r,c;
scanf("%d%d",&r,&c);
if (r==c) {
printf("%lld\n",r%2?(long long)r*r/4:(long long)r*r/4-1);
} else {
if (r%2==0||c%2==0) {
printf("%lld\n",(long long)r*c/2-1);
} else {
printf("%lld\n",(long long)r*c/2);
}
}
return 0;
}
kanpurin002