結果

問題 No.2297 Best Grouping
ユーザー 麻ch麻ch
提出日時 2023-05-28 01:06:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 638 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 10,636 KB
実行使用メモリ 7,988 KB
最終ジャッジ日時 2023-08-27 01:58:14
合計ジャッジ時間 2,022 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 16 ms
7,784 KB
testcase_02 AC 15 ms
7,776 KB
testcase_03 AC 14 ms
7,776 KB
testcase_04 AC 16 ms
7,776 KB
testcase_05 WA -
testcase_06 AC 15 ms
7,804 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 14 ms
7,792 KB
testcase_10 WA -
testcase_11 AC 14 ms
7,964 KB
testcase_12 AC 15 ms
7,792 KB
testcase_13 AC 15 ms
7,856 KB
testcase_14 AC 15 ms
7,756 KB
testcase_15 WA -
testcase_16 AC 14 ms
7,756 KB
testcase_17 WA -
testcase_18 AC 15 ms
7,852 KB
testcase_19 WA -
testcase_20 AC 15 ms
7,772 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 14 ms
7,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

# 2人のグループの個数として考えられる最小値を求める
# 2人のグループをできるだけ少なくするため、まず3人グループを作る
group_3 = N // 3

# 残りの人数に対して2人グループを作る
remainder = N % 3

# 2人のグループを作る場合、最大で1つまでしか作れないので、最小値は0または1
# 残りの人数が1人または2人の場合、2人のグループを作る
if remainder == 1 or remainder == 2:
    group_2 = 1
else:
    group_2 = 0

# 2人グループの個数の最小値を求める
min_group_2 = group_2

print(min_group_2)
0