結果
| 問題 |
No.2797 Square Tile
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-28 21:47:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 434 bytes |
| コンパイル時間 | 1,981 ms |
| コンパイル使用メモリ | 193,416 KB |
| 最終ジャッジ日時 | 2025-02-22 01:02:36 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int a,b; cin >> a >> b;
int tile = a*a+b*b,n = a*a+b*b;
int x = 0,y = 0;
while(tile--){
cout << x << " " << y << "\n";
x = (x+a)%n,y = (y+b)%n;
}
x = a,y = 0;
tile = n;
while(tile--){
cout << x << " " << y << "\n";
x = (x+a)%n; y = (y+b)%n;
}
}