LoginSignup
6
6

More than 5 years have passed since last update.

paizaで問題のデータの読み方

Posted at

paizaの問題の入力データを読み込む書き方がモヤモヤしていたがいい書き方があったのでメモっておく。

input.txt
3
1 2 3
4 5 6 
7 8 9
main.py
n = int(raw_input()) 

for i in range(n):
    a,b,c = map(int, raw_input().split())

    f(a,b,c)

def f(a,b,c):
    pass

6
6
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6