結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
kdaiki211
|
| 提出日時 | 2017-01-09 00:05:06 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 326 bytes |
| 記録 | |
| コンパイル時間 | 71 ms |
| コンパイル使用メモリ | 24,532 KB |
| 最終ジャッジ日時 | 2026-02-24 00:03:38 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c: In function 'main':
main.c:13:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
13 | for (int i = 0; i < len; i++) {
| ^~~
main.c:13:9: note: use option '-std=c99', '-std=gnu99', '-std=c11' or '-std=gnu11' to compile your code
ソースコード
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#define GETA ('Z' - 'A' + 1)
int main(void)
{
char S[1024+1];
int len;
scanf("%s", S);
len = strlen(S);
for (int i = 0; i < len; i++) {
int ofst = S[i] - 'A' - (i + 1);
while (ofst < 0) ofst += GETA;
putchar('A' + ofst);
}
putchar('\n');
return 0;
}
kdaiki211