結果
問題 | No.18 うーさー暗号 |
ユーザー |
![]() |
提出日時 | 2015-05-27 16:16:18 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 190 bytes |
コンパイル時間 | 75 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-07 05:43:56 |
合計ジャッジ時間 | 762 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%s", s); | ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void) { int i; char s[1025]; scanf("%s", s); i = 0; while(s[i] != '\0'){ printf("%c", (s[i] - (i % 26) - 1 - 65 + 26) % 26 + 65); i++; } return 0; }