結果
| 問題 |
No.671 1000000007
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2023-09-09 21:02:37 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 175 bytes |
| コンパイル時間 | 132 ms |
| コンパイル使用メモリ | 21,888 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-27 13:32:38 |
| 合計ジャッジ時間 | 766 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:13:24: warning: implicit declaration of function ‘abs’ [-Wimplicit-function-declaration]
13 | printf("%d\n", abs(i - 8));
| ^~~
main.c:3:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘abs’
2 | #include<math.h>
+++ |+#include <stdlib.h>
3 |
main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%s", n);
| ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<math.h>
int main(void){
int i = 0;
char n[20];
scanf("%s", n);
while(n[i + 1] != '7'){
i++;
}
printf("%d\n", abs(i - 8));
return 0;
}
suppy193