結果
| 問題 |
No.84 悪の算盤
|
| コンテスト | |
| ユーザー |
rsk0315
|
| 提出日時 | 2019-01-21 01:11:51 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 198 bytes |
| コンパイル時間 | 361 ms |
| コンパイル使用メモリ | 27,264 KB |
| 最終ジャッジ日時 | 2025-01-06 20:32:22 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 3 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%jd %jd", &R, &C);
| ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio>
#include <cstdint>
int main() {
intmax_t R, C;
scanf("%jd %jd", &R, &C);
if (R == C) {
return !printf("%jd\n", R-1);
} else {
printf("%jd\n", (R*C+1)/2-1);
}
}
rsk0315