結果
| 問題 |
No.296 n度寝
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-28 16:40:24 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 240 bytes |
| コンパイル時間 | 283 ms |
| コンパイル使用メモリ | 19,968 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 00:10:14 |
| 合計ジャッジ時間 | 1,275 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 8 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d%d%d%d",&N,&H,&M,&T);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void)
{
int N,H,M,T;
scanf("%d%d%d%d",&N,&H,&M,&T);
int n,h,m,t;
h=H;
m=M+(T*(N-1));
if(m<60){
printf("%d\n",h);
printf("%d\n",m);
}else if(m>=60){
printf("%d\n",h+1);
printf("%d\n",m-60);
}
return 0;
}