結果
問題 |
No.1004 サイコロの実装 (2)
|
ユーザー |
![]() |
提出日時 | 2020-09-15 22:09:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 570 bytes |
コンパイル時間 | 1,567 ms |
コンパイル使用メモリ | 167,260 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-22 02:44:00 |
合計ジャッジ時間 | 2,506 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 38 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); //xi+1=axi+b(mod m) //a,b,x0,nが与えられるので、高橋君と青木君のそれぞれの得点を求めよ。 //なお、サイコロの最初の出目はx1を6で割った余りにを足した整数とする。 ll a,b,x,n; cin>>a>>b>>x>>n; ll p1=0,p2=0; if(x%2==0){ p2=n/2; }else{ p1=n/2; } cout<<p1<<" "<<p2<<endl; }