結果
| 問題 | No.432 占い(Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-11 04:37:15 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 153 bytes |
| 記録 | |
| コンパイル時間 | 104 ms |
| コンパイル使用メモリ | 30,276 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-08 16:13:23 |
| 合計ジャッジ時間 | 859 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 |
コンパイルメッセージ
main.c:1:14: warning: data definition has no type or storage class
1 | char a[1010];n,j;p;
| ^
main.c:1:18: warning: data definition has no type or storage class
1 | char a[1010];n,j;p;
| ^
main.c: In function ‘main’:
main.c:5:23: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
5 | for(n=strlen(a);--n;a[n]=0)for(j=0;j++<n;a[j-1]=48+(p>9?p/10+p%10:p))p=a[j-1]+a[j]-96;
| ^~~~~~
main.c:1:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
+++ |+#include <string.h>
1 | char a[1010];n,j;p;
/usr/bin/ld: /tmp/ccxas6XN.o: in function `main':
main.c:(.text.startup+0x1e): 警告: the `gets' function is dangerous and should not be used.
ソースコード
char a[1010];n,j;p;
main(i){
for(;gets(a);--i&&puts(a))
{
for(n=strlen(a);--n;a[n]=0)for(j=0;j++<n;a[j-1]=48+(p>9?p/10+p%10:p))p=a[j-1]+a[j]-96;
}
}