結果
問題 | No.18 うーさー暗号 |
ユーザー |
|
提出日時 | 2017-01-11 23:26:02 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 299 bytes |
コンパイル時間 | 573 ms |
コンパイル使用メモリ | 54,520 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-07 06:24:07 |
合計ジャッジ時間 | 1,015 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include <iostream>#include <stdio.h>#include <string.h>#include <stdlib.h>int main(){char s[2048]; std::cin >> s;int N = strlen(s);for(int i=0; i<N; i++){int n = s[i] - 'A';n -= i+1;if(n < 0) n += 26*((-n-1)/26+1);n += 'A';printf("%c",n);}printf("\n");return 0;}