結果

問題 No.420 mod2漸化式
ユーザー kimiyukikimiyuki
提出日時 2016-09-10 00:19:11
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 20 ms / 1,000 ms
コード長 1,521 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 8,608 KB
最終ジャッジ日時 2023-08-25 23:25:46
合計ジャッジ時間 2,220 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,520 KB
testcase_01 AC 20 ms
8,524 KB
testcase_02 AC 18 ms
8,432 KB
testcase_03 AC 18 ms
8,500 KB
testcase_04 AC 18 ms
8,564 KB
testcase_05 AC 19 ms
8,564 KB
testcase_06 AC 18 ms
8,444 KB
testcase_07 AC 18 ms
8,428 KB
testcase_08 AC 18 ms
8,544 KB
testcase_09 AC 18 ms
8,468 KB
testcase_10 AC 18 ms
8,568 KB
testcase_11 AC 19 ms
8,480 KB
testcase_12 AC 18 ms
8,448 KB
testcase_13 AC 18 ms
8,588 KB
testcase_14 AC 18 ms
8,448 KB
testcase_15 AC 19 ms
8,608 KB
testcase_16 AC 18 ms
8,428 KB
testcase_17 AC 18 ms
8,564 KB
testcase_18 AC 18 ms
8,376 KB
testcase_19 AC 18 ms
8,384 KB
testcase_20 AC 18 ms
8,596 KB
testcase_21 AC 18 ms
8,564 KB
testcase_22 AC 18 ms
8,564 KB
testcase_23 AC 18 ms
8,376 KB
testcase_24 AC 18 ms
8,380 KB
testcase_25 AC 17 ms
8,504 KB
testcase_26 AC 18 ms
8,376 KB
testcase_27 AC 17 ms
8,464 KB
testcase_28 AC 18 ms
8,440 KB
testcase_29 AC 18 ms
8,384 KB
testcase_30 AC 18 ms
8,588 KB
testcase_31 AC 18 ms
8,572 KB
testcase_32 AC 18 ms
8,552 KB
testcase_33 AC 18 ms
8,508 KB
testcase_34 AC 18 ms
8,520 KB
testcase_35 AC 18 ms
8,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# #include <iostream>
# #include <array>
# #define repeat(i,n) for (int i = 0; (i) < (n); ++(i))
# typedef long long ll;
# using namespace std;
# int main() {
#     array<int,32> cnt = {};
#     array<ll, 32> acc = {};
#     for (ll x = 0; x < 1ll<<31; ++ x) {
#         int y = __builtin_popcountll(x);
#         cnt[y] += 1;
#         acc[y] += x;
#     }
#     repeat (i,32) {
#         cout << i << ' ' << cnt[i] << ' ' << acc[i] << endl;
#     }
#     return 0;
# }
s = '''
0 1 0
1 31 2147483647
2 465 64424509410
3 4495 934155386445
4 31465 8718783606820
5 169911 58851789346035
6 736281 306029304599382
7 2629575 1275122102497425
8 7888725 4371847208562600
9 20160075 12569060724617475
10 44352165 30724370660176050
11 84672315 64521178386369705
12 141120525 117311233429763100
13 206253075 185742786263791575
14 265182525 257182319442172950
15 300540195 312292816465495725
16 300540195 333112337563195440
17 265182525 312292816465495725
18 206253075 257182319442172950
19 141120525 185742786263791575
20 84672315 117311233429763100
21 44352165 64521178386369705
22 20160075 30724370660176050
23 7888725 12569060724617475
24 2629575 4371847208562600
25 736281 1275122102497425
26 169911 306029304599382
27 31465 58851789346035
28 4495 8718783606820
29 465 934155386445
30 31 64424509410
31 1 2147483647
'''
import collections
g = collections.defaultdict(lambda: (0, 0))
for line in s.strip().splitlines():
    a, b, c = map(int, line.split())
    g[a] = (b, c)
x = int(input())
print(*g[x])
0