結果
問題 |
No.254 文字列の構成
|
ユーザー |
![]() |
提出日時 | 2015-07-14 23:09:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 309 bytes |
コンパイル時間 | 1,292 ms |
コンパイル使用メモリ | 160,180 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-08 07:29:55 |
合計ジャッジ時間 | 6,188 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; char a = 'A', b = 'B'; while (N > 0) { int n = sqrt(N); N -= n * n; for (int i = 0; i < n - 1; i++) cout << a << b; cout << a; a += 2; b += 2; } cout << endl; }