結果
| 問題 |
No.350 d=vt
|
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2016-10-22 19:53:54 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 180 bytes |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 20,352 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-05 05:10:01 |
| 合計ジャッジ時間 | 586 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 12 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:16:11: warning: conversion lacks type at end of format [-Wformat=]
16 | printf("%.0",y);
| ^
main.c:16:8: warning: too many arguments for format [-Wformat-extra-args]
16 | printf("%.0",y);
| ^~~~~
main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%lf%d", &v,&t);
| ^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
double v;
int t;
double y;
double k;
scanf("%lf%d", &v,&t);
y = v*t;
k=y/t;
if(k==v){
y=y-1;
}
printf("%.0",y);
return 0;
}
Haijinn