結果
問題 | No.701 ひとりしりとり |
ユーザー |
![]() |
提出日時 | 2018-06-15 23:46:07 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 14 ms / 2,000 ms |
コード長 | 895 bytes |
コンパイル時間 | 514 ms |
コンパイル使用メモリ | 60,656 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 15:33:54 |
合計ジャッジ時間 | 1,350 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:32:59: warning: format ‘%c’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=] 32 | printf("a%c%c%c%ca\n", c, d, e, f); | ~^ ~ | | | | int long int | %ld main.cpp:32:61: warning: format ‘%c’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=] 32 | printf("a%c%c%c%ca\n", c, d, e, f); | ~^ ~ | | | | int long int | %ld main.cpp:32:63: warning: format ‘%c’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat=] 32 | printf("a%c%c%c%ca\n", c, d, e, f); | ~^ ~ | | | | int long int | %ld main.cpp:32:65: warning: format ‘%c’ expects argument of type ‘int’, but argument 5 has type ‘long int’ [-Wformat=] 32 | printf("a%c%c%c%ca\n", c, d, e, f); | ~^ ~
ソースコード
#include<iostream> #include <algorithm> #include<string> #include <bitset> #include <vector> using namespace std; int main() { //int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, ans = 0; long a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0, k = 0, l = 0, ans = 0; //cout << LONG_MAX << endl; //string s[1001]; char buffer[33]; cin >> a; b = 0; if (a == 1) { cout << "an" << endl; return 0; } //for ( b = 0; b < a; b++) { for (c = 97; c < 123; c++) { for (d = 97; d < 123; d++) { for (e = 97; e < 123; e++) { for (f = 97; f < 123; f++) { printf("a%c%c%c%ca\n", c, d, e, f); b++; if (b == a-1) { cout << "an" << endl; return 0; } } } } } //c = 'a'; //c += b; //cout << "a" << c << endl; } //cout << ans << endl; return 0; }