結果
問題 | No.84 悪の算盤 |
ユーザー |
![]() |
提出日時 | 2019-06-22 14:30:14 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 286 bytes |
コンパイル時間 | 803 ms |
コンパイル使用メモリ | 26,752 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 08:59:16 |
合計ジャッジ時間 | 1,817 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
// yukicoder: No.84 悪の算盤// 2019.6.22 bal4u#include <stdio.h>int main(){int R, C;long long ans;scanf("%d%d", &R, &C);ans = (long long)R * C;if (R == C) printf("%lld\n", (ans >> 2) - 1 + (ans & 1));else printf("%lld\n", (ans >> 1) - 1 + (ans & 1));return 0;}