結果

問題 No.296 n度寝
ユーザー naimonon77
提出日時 2015-11-12 20:41:45
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 386 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 22,912 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-06 22:28:03
合計ジャッジ時間 613 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |   scanf("%d %d %d %d",&n,&h,&m,&t);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>

/* ここからが本編 */
/* */
/* 入力開始! */
/* 入力終了! */
/* ll_pow(x,n)はx^nを返すよ! */

int main(void)
{
  int i,j;
  int n,h,m,t;
  int s[100],k[100];
  scanf("%d %d %d %d",&n,&h,&m,&t);
  m += h*60;
  m += t*(n-1);
  m -= ( m/(60*24) )*60*24;
  h = m / 60;
  
  printf("%d\n",h);
  m %= 60;
  printf("%d\n",m);
  
  
  
  return 0;
}
0