結果
| 問題 |
No.18 うーさー暗号
|
| コンテスト | |
| ユーザー |
phi_prog_8
|
| 提出日時 | 2016-02-26 20:12:24 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 271 bytes |
| コンパイル時間 | 106 ms |
| コンパイル使用メモリ | 21,888 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-22 14:00:37 |
| 合計ジャッジ時間 | 684 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 8 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%s",str);
| ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
int main(void) {
char str[1500]={0};
int n;
int i,j;
scanf("%s",str);
n=strlen(str);
for (i=0; i<n; i++) {
str[i]-=i+1;
while (str[i] < 'A') {
str[i]+='Z'-'A'+1;
}
}
printf("%s\n",str);
}
phi_prog_8