結果
問題 | No.420 mod2漸化式 |
ユーザー |
|
提出日時 | 2016-09-10 00:19:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 1,000 ms |
コード長 | 1,521 bytes |
コンパイル時間 | 430 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-12-24 11:23:30 |
合計ジャッジ時間 | 2,695 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 35 |
ソースコード
#!/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 01 31 21474836472 465 644245094103 4495 9341553864454 31465 87187836068205 169911 588517893460356 736281 3060293045993827 2629575 12751221024974258 7888725 43718472085626009 20160075 1256906072461747510 44352165 3072437066017605011 84672315 6452117838636970512 141120525 11731123342976310013 206253075 18574278626379157514 265182525 25718231944217295015 300540195 31229281646549572516 300540195 33311233756319544017 265182525 31229281646549572518 206253075 25718231944217295019 141120525 18574278626379157520 84672315 11731123342976310021 44352165 6452117838636970522 20160075 3072437066017605023 7888725 1256906072461747524 2629575 437184720856260025 736281 127512210249742526 169911 30602930459938227 31465 5885178934603528 4495 871878360682029 465 93415538644530 31 6442450941031 1 2147483647'''import collectionsg = 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])