結果
| 問題 |
No.1004 サイコロの実装 (2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-01 07:09:48 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 456 bytes |
| コンパイル時間 | 1,720 ms |
| コンパイル使用メモリ | 191,344 KB |
| 最終ジャッジ日時 | 2025-01-21 20:56:58 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 37 WA * 1 |
ソースコード
#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;
x0 %= (1LL << 32);
x0 += 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;
}