結果
| 問題 |
No.600 かい文回
|
| コンテスト | |
| ユーザー |
ku_material_ro
|
| 提出日時 | 2017-11-25 01:40:26 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 694 bytes |
| コンパイル時間 | 1,255 ms |
| コンパイル使用メモリ | 74,560 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-27 09:00:58 |
| 合計ジャッジ時間 | 1,930 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 2 |
ソースコード
#include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#define REP(i,n) for(int i=0;i<n;i++)
typedef long long ll;
using namespace std;
int kaijo(int n){
int ans = 1;
if (n != 0){
for (int i = 0; i < n; i++){
ans *= (n - i);
}
}
else{
ans = 1;
}
return ans;
}
int main(){
string s;
string s2;
string str="a";
int n;
cin >> n;
while (n != 1){
if (n == (n / 2) * 2){
n = n / 2;
s = s+str;
}
else{
n = n - 1;
s = s + str;
str[0] = str[0] + 1;
}
if (str == "z"){
str = "ba";
}
}
//cout << s << endl;
s2 = s;
reverse(s.begin(), s.end());
cout << s2 << "z" << s << endl;
return 0;
}
ku_material_ro