結果
| 問題 | No.3454 Zodiac |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-28 13:50:40 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 327 bytes |
| 記録 | |
| コンパイル時間 | 3,515 ms |
| コンパイル使用メモリ | 339,400 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-02-28 13:50:45 |
| 合計ジャッジ時間 | 4,476 ms |
|
ジャッジサーバーID (参考情報) |
judge7 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 WA * 6 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#include<atcoder/math>
using namespace atcoder;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll P,Q,Y,p,q,y;
cin>>P>>Q>>Y>>p>>q>>y;
p=p+(y-Y)%P;
q=q+(y-Y)%Q;
if(p>P)p-=P;
if(q>Q)q-=Q;
cout<<p<<" "<<q<<"\n";
}