結果
| 問題 | No.18 うーさー暗号 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2016-10-19 18:15:13 | 
| 言語 | C90 (gcc 12.3.0) | 
| 結果 | 
                                WA
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 266 bytes | 
| コンパイル時間 | 590 ms | 
| コンパイル使用メモリ | 21,504 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-07-07 06:20:51 | 
| 合計ジャッジ時間 | 716 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 13 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:3: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |   fgets(text, 1026, stdin);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
  char text[1026];
  int i;
  fgets(text, 1026, stdin);
  for(i=0; i<strlen(text)-1; i++) text[i] = 'A' + (text[i] - 'A' + 2600 + 26 - (i + 1)) % 26;
  printf("%s\n", text);
  return 0;
}
            
            
            
        