結果
問題 |
No.1004 サイコロの実装 (2)
|
ユーザー |
|
提出日時 | 2021-06-01 07:05:56 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 424 bytes |
コンパイル時間 | 2,004 ms |
コンパイル使用メモリ | 193,128 KB |
最終ジャッジ日時 | 2025-01-21 20:56:48 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 WA * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); long long int a, b, x, n; cin >> a >> b >> x >> n; long long int x0 = a * x + b; x0 %= (1LL << 32); x0 %= 6; x0 += 1; if (x0 % 2 != 1) { cout << n / 2 << ' ' << 0 << '\n'; } else { cout << 0 << ' ' << n / 2 << '\n'; } return 0; }