結果
| 問題 |
No.2239 Friday
|
| コンテスト | |
| ユーザー |
chro_96
|
| 提出日時 | 2023-03-10 21:24:28 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 367 bytes |
| コンパイル時間 | 258 ms |
| コンパイル使用メモリ | 29,056 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-18 03:34:15 |
| 合計ジャッジ時間 | 1,024 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 16 |
ソースコード
#include <stdio.h>
int main () {
int a = 0;
int b = 0;
int res = 0;
int ans = 0;
res = scanf("%d", &a);
res = scanf("%d", &b);
if (a > b) {
int swap = a;
a = b;
b = swap;
}
ans = a+b;
while (a > 0 && ans > 0) {
a--;
ans -= 2;
if (ans < 0) {
ans += 2;
}
}
printf("%d\n", ans);
return 0;
}
chro_96