結果
| 問題 | No.1004 サイコロの実装 (2) |
| コンテスト | |
| ユーザー |
leaf_1415
|
| 提出日時 | 2020-03-06 21:49:34 |
| 言語 | C++11(廃止可能性あり) (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 360 bytes |
| 記録 | |
| コンパイル時間 | 466 ms |
| コンパイル使用メモリ | 54,096 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-14 06:13:19 |
| 合計ジャッジ時間 | 1,630 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 38 |
ソースコード
#include <iostream>
#define llint long long
using namespace std;
llint a, b, x, n;
llint get()
{
x = (a * x + b) % (1LL<<32);
return x;
}
int main(void)
{
ios::sync_with_stdio(0);
cin.tie(0);
cin >> a >> b >> x >> n;
llint r = (get() % 6 + 1) % 2;
if(r == 0) cout << 0 << " " << n/2 << endl;
else cout << n/2 << " " << 0 << endl;
return 0;
}
leaf_1415