結果
問題 |
No.8015 アンチローリングハッシュ
|
ユーザー |
![]() |
提出日時 | 2015-10-31 03:21:05 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 331 bytes |
コンパイル時間 | 418 ms |
コンパイル使用メモリ | 55,432 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 06:14:45 |
合計ジャッジ時間 | 1,524 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
#include <iostream> #include <string> using namespace std; int main() { int b; cin.ignore(9, ' '); cin >> b; int phi = b; for(int x = b, p = 2; p <= x; ++ p) if(x % p == 0) { phi -= phi / p; while(x % p == 0) x /= p; } string S(phi + 19, 'a'), T = S; ++ T[0], ++ S[phi]; cout << S << '\n' << T << endl; return 0; }