結果

問題 No.682 Average
ユーザー konabekonabe
提出日時 2018-05-11 22:59:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 269 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 7,996 KB
最終ジャッジ日時 2023-09-10 17:45:34
合計ジャッジ時間 1,099 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,768 KB
testcase_01 AC 15 ms
7,724 KB
testcase_02 AC 15 ms
7,732 KB
testcase_03 AC 14 ms
7,776 KB
testcase_04 AC 15 ms
7,724 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 15 ms
7,720 KB
testcase_08 AC 15 ms
7,840 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 15 ms
7,720 KB
testcase_12 AC 15 ms
7,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B = list(map(int, input().split()))
res = 0 if (A + B) % 3 == 0 else 3 - (A + B) % 3
start = A if res == A % 3 else A + abs(res - (A % 3))
end = B if res == B % 3 else B - abs(3 + B % 3 - res if B > B % 3 else 0)
print(0 if end - start < 3 else (end - start)//3 + 1)
0