結果
| 問題 |
No.350 d=vt
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2016-06-27 11:51:20 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 275 bytes |
| コンパイル時間 | 211 ms |
| コンパイル使用メモリ | 21,376 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-05 05:00:17 |
| 合計ジャッジ時間 | 692 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%s%d", v, &t);
| ^~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char v[7];
char temp[2];
int t, d = 0;
int i;
scanf("%s%d", v, &t);
for( i = 2;i < 6;i++){
temp[0] = v[i];
temp[1] = '\0';
d += atoi(temp) * t;
d *= 10;
}
printf("%d\n", d / 100000);
return 0;
}
suppy193